From 66874cc598df5c546ca23fcbae93a2ea81aed97f Mon Sep 17 00:00:00 2001 From: Andrew Crites Date: Thu, 27 Apr 2017 00:35:47 -0400 Subject: [PATCH] chore(build): allow option to specify plugins to build (#1421) --- scripts/build/build.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/build/build.js b/scripts/build/build.js index 987c5b80..491ace37 100644 --- a/scripts/build/build.js +++ b/scripts/build/build.js @@ -40,7 +40,6 @@ PLUGIN_PACKAGE_JSON.peerDependencies = PLUGIN_PEER_DEPS; console.log('Making new TMP directory'); fs.mkdirpSync(BUILD_TMP); - // Prepare and copy the core module's package.json console.log('Preparing core module package.json'); CORE_PACKAGE_JSON.version = IONIC_NATIVE_VERSION; @@ -51,6 +50,11 @@ fs.writeJsonSync(path.resolve(BUILD_CORE_DIST, 'package.json'), CORE_PACKAGE_JSO // Fetch a list of the plugins const PLUGINS = fs.readdirSync(PLUGINS_PATH); +// Build specific list of plugins to build from arguments, if any +let pluginsToBuild = process.argv.slice(2); +if (!pluginsToBuild.length) { + pluginsToBuild = PLUGINS; +} // Create a queue to process tasks const QUEUE = queue({ @@ -116,7 +120,7 @@ const addPluginToQueue = pluginName => { }; -PLUGINS.forEach(addPluginToQueue); +pluginsToBuild.forEach(addPluginToQueue); QUEUE.start((err) => {