chore(build): allow option to specify plugins to build (#1421)

This commit is contained in:
Andrew Crites 2017-04-27 00:35:47 -04:00 committed by Ibby Hadeed
parent 16dc71ab71
commit 66874cc598

View File

@ -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) => {