diff --git a/.babelrc b/.babelrc index 253333ac3..76a0651f3 100644 --- a/.babelrc +++ b/.babelrc @@ -3,10 +3,7 @@ "presets": [ ["@babel/preset-env", { "targets": { - "browsers": [ - "last 2 versions" - ], - "node": 12 + "node": 10 }, "modules": "commonjs" }], diff --git a/package.json b/package.json index c96d8450f..7317f157b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "yarn clean && git rev-parse HEAD > git-revision.txt && yarn build:compile && yarn build:compile-browser && yarn build:types", "build:types": "tsc --emitDeclarationOnly", "build:compile": "babel src -s -d lib --verbose --extensions \".ts,.js\"", - "build:compile-browser": "mkdirp dist && browserify -d src/browser-index.js -p [ tsify -p ./tsconfig.json ] -t [ babelify --sourceMaps=inline ] > dist/browser-matrix.js", + "build:compile-browser": "mkdirp dist && browserify -d src/browser-index.js -p [ tsify -p ./tsconfig.json ] -t [ babelify --sourceMaps=inline ] -t uglifyify > dist/browser-matrix.js", "gendoc": "jsdoc -c jsdoc.json -P package.json", "lint": "yarn lint:types && yarn lint:ts && yarn lint:js", "lint:js": "eslint --max-warnings 93 src spec", @@ -79,7 +79,8 @@ "source-map-support": "^0.5.13", "tsify": "^4.0.1", "tslint": "^5.20.1", - "typescript": "^3.7.3" + "typescript": "^3.7.3", + "uglifyify": "^5.0.2" }, "jest": { "testEnvironment": "node" diff --git a/yarn.lock b/yarn.lock index c953f0bba..70b0e7eb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5654,7 +5654,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.13, source-map-support@^0.5.16, source-map-support@^0.5.6: +source-map-support@^0.5.13, source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.10: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== @@ -5955,6 +5955,15 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.3" +terser@^3.7.5: + version "3.17.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-3.17.0.tgz#f88ffbeda0deb5637f9d24b0da66f4e15ab10cb2" + integrity sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ== + dependencies: + commander "^2.19.0" + source-map "~0.6.1" + source-map-support "~0.5.10" + test-exclude@^5.2.3: version "5.2.3" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" @@ -5983,7 +5992,7 @@ through2@^2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -"through@>=2.2.7 <3", through@^2.3.6: +"through@>=2.2.7 <3", through@^2.3.6, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -6202,6 +6211,17 @@ uglify-to-browserify@~1.0.0: resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= +uglifyify@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/uglifyify/-/uglifyify-5.0.2.tgz#7d0269885e09faa963208a9ec6721afcaf45fc50" + integrity sha512-NcSk6pgoC+IgwZZ2tVLVHq+VNKSvLPlLkF5oUiHPVOJI0s/OlSVYEGXG9PCAH0hcyFZLyvt4KBdPAQBRlVDn1Q== + dependencies: + convert-source-map "~1.1.0" + minimatch "^3.0.2" + terser "^3.7.5" + through "~2.3.4" + xtend "^4.0.1" + umd@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/umd/-/umd-3.0.3.tgz#aa9fe653c42b9097678489c01000acb69f0b26cf"