]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Move uglify-js's config back to CLI. (#24147)
authorXhmikosR <xhmikosr@gmail.com>
Thu, 28 Sep 2017 12:35:23 +0000 (15:35 +0300)
committerGitHub <noreply@github.com>
Thu, 28 Sep 2017 12:35:23 +0000 (15:35 +0300)
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 [deleted file]
package.json

diff --git a/build/uglifyjs.config.json b/build/uglifyjs.config.json
deleted file mode 100644 (file)
index c536aed..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "output": {
-    "comments": "/^!/"
-  },
-  "compress": {
-    "typeofs": false
-  }
-}
index 9bd1c6f39cd995ba910b8a33c5ee46103e9d6713..601dd09f767fd0fb4194ffa38e26affe5ed45ac3 100644 (file)
@@ -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",