From 83086fddd0d519a458a37c07dd02b0d1972c8d05 Mon Sep 17 00:00:00 2001 From: rr- Date: Sat, 14 May 2016 14:47:48 +0200 Subject: client/general: skip vendor JS on watch --- client/build.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'client/build.js') diff --git a/client/build.js b/client/build.js index 14b59b8..0581c3a 100644 --- a/client/build.js +++ b/client/build.js @@ -129,7 +129,7 @@ function bundleJs(config) { 'babel-polyfill', ]; glob('./js/**/*.js', {}, (er, files) => { - { + if (!process.argv.includes('--no-vendor-js')) { let b = browserify(); for (let lib of external) { b.require(lib); @@ -138,7 +138,7 @@ function bundleJs(config) { b, './public/vendor.min.js', 'Bundled vendor JS', true); } - { + if (!process.argv.includes('--no-app-js')) { let outputFile = fs.createWriteStream('./public/app.min.js'); let b = browserify({debug: config.debug}); if (config.transpile) { @@ -164,7 +164,13 @@ function copyFile(source, target) { const config = getConfig(); bundleConfig(config); -bundleHtml(config); -bundleCss(); -bundleJs(config); +if (!process.argv.includes('--no-html')) { + bundleHtml(config); +} +if (!process.argv.includes('--no-css')) { + bundleCss(); +} +if (!process.argv.includes('--no-js')) { + bundleJs(config); +} copyFile('./img/favicon.png', './public/favicon.png'); -- cgit v1.3