From 6773ed341c0d8ea4ed5c373783245a68826bdde7 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Sun, 14 May 2017 00:20:38 -0400 Subject: [PATCH] chore(): add --ignore-errors flag --- scripts/build/build.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/build/build.js b/scripts/build/build.js index a54ca9174..bd81852f5 100644 --- a/scripts/build/build.js +++ b/scripts/build/build.js @@ -52,8 +52,15 @@ const PLUGINS = fs.readdirSync(PLUGINS_PATH); // Build specific list of plugins to build from arguments, if any let pluginsToBuild = process.argv.slice(2); +let ignoreErrors = false; if (!pluginsToBuild.length) { pluginsToBuild = PLUGINS; +} else { + const index = pluginsToBuild.indexOf('--ignore-errors'); + if (index > -1) { + ignoreErrors = true; + pluginsToBuild.splice(index, 1); + } } // Create a queue to process tasks @@ -102,10 +109,14 @@ const addPluginToQueue = pluginName => { exec(`${ROOT}/node_modules/.bin/ngc -p ${tsConfigPath}`, (err, stdout, stderr) => { if (err) { - // oops! something went wrong. - callback(`\n\nBuilding ${pluginName} failed.`); console.log(err); - return; + + if (!ignoreErrors) { + // oops! something went wrong. + callback(`\n\nBuilding ${pluginName} failed.`); + return; + } + } // we're done with this plugin!