]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Use config file for UglifyJS to ensure same behavior on every environments (#22990)
authorJohann-S <johann.servoire@gmail.com>
Wed, 5 Jul 2017 07:53:23 +0000 (09:53 +0200)
committerGitHub <noreply@github.com>
Wed, 5 Jul 2017 07:53:23 +0000 (09:53 +0200)
build/uglifyjs.config.json [new file with mode: 0644]
package.json

diff --git a/build/uglifyjs.config.json b/build/uglifyjs.config.json
new file mode 100644 (file)
index 0000000..2b53a56
--- /dev/null
@@ -0,0 +1,5 @@
+{
+       "output" : {
+               "comments": "/^!/"
+       }
+}
index fed3fd77526bf44fb3a589d5c5aa92cb4d17cf09..88c13ceeb312d75436c31be54e6d151a9b273ab3 100644 (file)
@@ -35,8 +35,8 @@
     "js-compile": "npm-run-all --parallel js-compile-*",
     "js-compile-bundle": "shx cat js/src/util.js js/src/alert.js js/src/button.js js/src/carousel.js js/src/collapse.js js/src/dropdown.js js/src/modal.js js/src/scrollspy.js js/src/tab.js js/src/tooltip.js js/src/popover.js | shx sed \"s/^(import|export).*//\" | babel --filename js/src/bootstrap.js | node build/stamp.js > dist/js/bootstrap.js",
     "js-compile-plugins": "babel js/src/ --out-dir js/dist/ --source-maps",
-    "js-minify": "uglifyjs --compress warnings=false --mangle --comments '/^!/' --output dist/js/bootstrap.min.js dist/js/bootstrap.js",
-    "js-minify-docs": "uglifyjs --compress warnings=false --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",
+    "js-minify": "uglifyjs --config-file build/uglifyjs.config.json --output dist/js/bootstrap.min.js dist/js/bootstrap.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",
     "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",