diff options
| author | rr- <rr-@sakuya.pl> | 2016-05-14 14:47:48 +0200 |
|---|---|---|
| committer | rr- <rr-@sakuya.pl> | 2016-05-14 14:47:48 +0200 |
| commit | 83086fddd0d519a458a37c07dd02b0d1972c8d05 (patch) | |
| tree | ecbafaf605148c8616516a63c99ea5b7ac635001 /client/build.js | |
| parent | e6be94d1392d443bc1af8a26725b8548e9c247ce (diff) | |
client/general: skip vendor JS on watch
Diffstat (limited to 'client/build.js')
| -rw-r--r-- | client/build.js | 16 |
1 files changed, 11 insertions, 5 deletions
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'); |