From 1137a66b65d3eab94e6ee2a2cff097ba8540954c Mon Sep 17 00:00:00 2001 From: Espen Hovlandsdal Date: Sun, 26 Apr 2020 14:38:43 -0700 Subject: [PATCH] Replace jsmin with terser --- package.json | 4 ++-- yarn.lock | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index cfe8e43b..2adf2613 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "scripts": { "clean": "rimraf dist", "compile": "tsc -d && yarn run minify", - "minify": "jsmin -o dist/index.min.js dist/index.js", + "minify": "terser -c -m --source-map \"content='./dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js -- dist/index.js", "pretest": "npm run clean && npm run compile", "test": "echo 'test'", "posttest": "npm run lint", @@ -24,7 +24,6 @@ }, "dependencies": { "cookie": "^0.4.0", - "jsmin": "^1.0.1", "set-cookie-parser": "^2.4.3" }, "devDependencies": { @@ -38,6 +37,7 @@ "pretty-quick": "2.0.1", "rimraf": "3.0.2", "semantic-release": "17.0.7", + "terser": "^4.6.12", "ts-loader": "6.2.2", "ts-node": "8.9.1", "tslint": "6.1.1", diff --git a/yarn.lock b/yarn.lock index ada24c88..d7b46bcb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5178,11 +5178,6 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= -jsmin@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/jsmin/-/jsmin-1.0.1.tgz#e7bd0dcd6496c3bf4863235bf461a3d98aa3b98c" - integrity sha1-570NzWSWw79IYyNb9GGj2YqjuYw= - json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -9417,6 +9412,15 @@ terser@^4.1.2: source-map "~0.6.1" source-map-support "~0.5.12" +terser@^4.6.12: + version "4.6.12" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.12.tgz#44b98aef8703fdb09a3491bf79b43faffc5b4fee" + integrity sha512-fnIwuaKjFPANG6MAixC/k1TDtnl1YlPLUlLVIxxGZUn1gfUx2+l3/zGNB72wya+lgsb50QBi2tUV75RiODwnww== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + text-extensions@^1.0.0: version "1.7.0" resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39"