From fe06814f3e3c72f36bb2ab96df206cc564fb74b0 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 28 Sep 2017 15:35:23 +0300 Subject: [PATCH] Move uglify-js's config back to CLI. (#24147) We need to pass different options and this seems cleaner at this point. In order for docs.min.js to keeps all comments, we don't pass `compress`. --- build/uglifyjs.config.json | 8 -------- package.json | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 build/uglifyjs.config.json diff --git a/build/uglifyjs.config.json b/build/uglifyjs.config.json deleted file mode 100644 index c536aed2ba..0000000000 --- a/build/uglifyjs.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "output": { - "comments": "/^!/" - }, - "compress": { - "typeofs": false - } -} diff --git a/package.json b/package.json index 9bd1c6f39c..601dd09f76 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,9 @@ "js-compile-bundle": "cross-env ROLLUP=true rollup --environment BUNDLE:true --config build/rollup.config.js", "js-compile-plugins": "cross-env PLUGINS=true babel js/src/ --out-dir js/dist/ --source-maps", "js-minify": "npm-run-all --parallel js-minify-standalone js-minify-bundle", - "js-minify-standalone": "uglifyjs --config-file build/uglifyjs.config.json --output dist/js/bootstrap.min.js dist/js/bootstrap.js", - "js-minify-bundle": "uglifyjs --config-file build/uglifyjs.config.json --output dist/js/bootstrap.bundle.min.js dist/js/bootstrap.bundle.js", - "js-minify-docs": "uglifyjs --config-file build/uglifyjs.config.json --output assets/js/docs.min.js assets/js/vendor/anchor.min.js assets/js/vendor/clipboard.min.js assets/js/vendor/holder.min.js assets/js/src/application.js assets/js/src/pwa.js", + "js-minify-standalone": "uglifyjs --compress typeofs=false --mangle --comments \"/^!/\" --output dist/js/bootstrap.min.js dist/js/bootstrap.js", + "js-minify-bundle": "uglifyjs --compress typeofs=false --mangle --comments \"/^!/\" --output dist/js/bootstrap.bundle.min.js dist/js/bootstrap.bundle.js", + "js-minify-docs": "uglifyjs --mangle --comments \"/^!/\" --output assets/js/docs.min.js assets/js/vendor/anchor.min.js assets/js/vendor/clipboard.min.js assets/js/vendor/holder.min.js assets/js/src/application.js assets/js/src/pwa.js", "js-test": "phantomjs ./node_modules/qunit-phantomjs-runner/runner.js js/tests/index.html 60", "js-test-cloud": "ruby -r webrick -e \"s = WEBrick::HTTPServer.new(:Port => 3000, :DocumentRoot => Dir.pwd, :Logger => WEBrick::Log.new('/dev/null'), :AccessLog => []); trap('INT') { s.shutdown }; s.start\" & grunt saucelabs-qunit", "docs": "npm-run-all docs-compile docs-lint",