From d8acb2f9160c2518dd94468c91a5fd124f58d795 Mon Sep 17 00:00:00 2001 From: IanDelMar <42134098+IanDelMar@users.noreply.github.com> Date: Sun, 6 Mar 2022 21:03:15 +0100 Subject: [PATCH] merge bootstrap 4 terser config into bootstrap 5 terser config --- package.json | 4 ++-- src/build/terser.config-bs4.json | 24 ------------------------ src/build/terser.config.json | 3 +-- 3 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 src/build/terser.config-bs4.json diff --git a/package.json b/package.json index f0d89df4..bea3c435 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,10 @@ "css-postcss-bs4": "postcss --config src/build/postcss.config.js --replace \"css/*.css\" \"!css/*.rtl*.css\" \"!css/*.min.css\" \"!css/theme.css\" \"!css/custom-editor-style.css\" -- BS4", "js": "npm-run-all js-compile js-minify", "js-compile": "rollup --config src/build/rollup.config.js --sourcemap", - "js-minify": "terser --config-file src/build/terser.config.json --output js/theme.min.js js/theme.js", + "js-minify": "terser js/theme.min.js --config-file src/build/terser.config.json --source-map \"content=js/theme.js.map,url=theme.min.js.map,filename=theme.min.js\" --output js/theme.min.js", "js-bs4": "npm-run-all js-compile-bs4 js-minify-bs4", "js-compile-bs4": "npm run js-compile -- BS4", - "js-minify-bs4": "terser --config-file src/build/terser.config-bs4.json --output js/theme-bootstrap4.min.js js/theme-bootstrap4.js", + "js-minify-bs4": "terser js/theme-bootstrap4.min.js --config-file src/build/terser.config.json --source-map \"content=js/theme-bootstrap4.js.map,url=theme-bootstrap4.min.js.map,filename=theme-bootstrap4.min.js\" --output js/theme-bootstrap4.min.js", "watch": "npm-run-all --parallel watch-run-*", "watch-bs": "npm-run-all --parallel bs watch-run-*", "watch-run-css": "nodemon --watch src/sass/ --ext scss --exec \"npm-run-all css\"", diff --git a/src/build/terser.config-bs4.json b/src/build/terser.config-bs4.json deleted file mode 100644 index c01b5dc1..00000000 --- a/src/build/terser.config-bs4.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "parse": { - }, - "compress": { - "booleans": true, - "conditionals": true, - "drop_console": true, - "drop_debugger": true, - "if_return": true, - "join_vars": true, - "keep_classnames": false, - "keep_fnames": false, - "reduce_vars": true, - "sequences": true, - "warnings": false, - "ecma": 5 - }, - "mangle": { - }, - "sourceMap": { - "filename": "js/theme-bootstrap4.js.map", - "url": "theme-bootstrap4.min.js.map" - } -} diff --git a/src/build/terser.config.json b/src/build/terser.config.json index 7f37ab01..45d2840d 100644 --- a/src/build/terser.config.json +++ b/src/build/terser.config.json @@ -18,7 +18,6 @@ "mangle": { }, "sourceMap": { - "filename": "js/theme.js.map", - "url": "theme.min.js.map" + "includeSources": true } }