build: switch from uglify-js to uglify-es (#22669)
This enables us to minify ES2015 code. PR Close #22669
This commit is contained in:
parent
c602563589
commit
eb6fb2d8f9
5
build.sh
5
build.sh
|
@ -219,7 +219,8 @@ minify() {
|
||||||
base_file=$( basename "${file}" )
|
base_file=$( basename "${file}" )
|
||||||
if [[ "${base_file}" =~ $regex && "${base_file##*.}" != "map" ]]; then
|
if [[ "${base_file}" =~ $regex && "${base_file##*.}" != "map" ]]; then
|
||||||
local out_file=$(dirname "${file}")/${BASH_REMATCH[1]}.min.js
|
local out_file=$(dirname "${file}")/${BASH_REMATCH[1]}.min.js
|
||||||
$UGLIFYJS -c --screw-ie8 --comments -o ${out_file} --source-map ${out_file}.map --prefix relative --source-map-include-sources ${file}
|
echo "====== $UGLIFY -c --comments -o ${out_file} --source-map "includeSources=true,content='${file}.map',filename='${out_file}.map'" ${file}"
|
||||||
|
$UGLIFY -c --comments -o ${out_file} --source-map "includeSources=true,content='${file}.map',filename='${out_file}.map'" ${file}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -344,7 +345,7 @@ N="
|
||||||
"
|
"
|
||||||
TSC=`pwd`/node_modules/.bin/tsc
|
TSC=`pwd`/node_modules/.bin/tsc
|
||||||
NGC="node --max-old-space-size=3000 `pwd`/dist/tools/@angular/compiler-cli/src/main"
|
NGC="node --max-old-space-size=3000 `pwd`/dist/tools/@angular/compiler-cli/src/main"
|
||||||
UGLIFYJS=`pwd`/node_modules/.bin/uglifyjs
|
UGLIFY=`pwd`/node_modules/.bin/uglifyjs
|
||||||
TSCONFIG=./tools/tsconfig.json
|
TSCONFIG=./tools/tsconfig.json
|
||||||
ROLLUP=`pwd`/node_modules/.bin/rollup
|
ROLLUP=`pwd`/node_modules/.bin/rollup
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@
|
||||||
"tslint-eslint-rules": "4.1.1",
|
"tslint-eslint-rules": "4.1.1",
|
||||||
"tsutils": "2.20.0",
|
"tsutils": "2.20.0",
|
||||||
"typescript": "2.7.x",
|
"typescript": "2.7.x",
|
||||||
"uglify-js": "2.8.29",
|
"uglify-es": "^3.3.9",
|
||||||
"universal-analytics": "0.4.15",
|
"universal-analytics": "0.4.15",
|
||||||
"vlq": "0.2.2",
|
"vlq": "0.2.2",
|
||||||
"vrsource-tslint-rules": "5.1.1",
|
"vrsource-tslint-rules": "5.1.1",
|
||||||
|
|
17
yarn.lock
17
yarn.lock
|
@ -1203,6 +1203,10 @@ commander@^2.5.0, commander@^2.8.1, commander@^2.9.0:
|
||||||
version "2.11.0"
|
version "2.11.0"
|
||||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563"
|
||||||
|
|
||||||
|
commander@~2.13.0:
|
||||||
|
version "2.13.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
|
||||||
|
|
||||||
commondir@0.0.1:
|
commondir@0.0.1:
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/commondir/-/commondir-0.0.1.tgz#89f00fdcd51b519c578733fec563e6a6da7f5be2"
|
resolved "https://registry.yarnpkg.com/commondir/-/commondir-0.0.1.tgz#89f00fdcd51b519c578733fec563e6a6da7f5be2"
|
||||||
|
@ -6562,6 +6566,10 @@ source-map@^0.4.4, source-map@~0.4.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
amdefine ">=0.0.4"
|
amdefine ">=0.0.4"
|
||||||
|
|
||||||
|
source-map@~0.6.1:
|
||||||
|
version "0.6.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||||
|
|
||||||
sparkles@^1.0.0:
|
sparkles@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3"
|
resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3"
|
||||||
|
@ -7208,6 +7216,13 @@ typescript@2.7.x:
|
||||||
version "2.7.2"
|
version "2.7.2"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.2.tgz#2d615a1ef4aee4f574425cdff7026edf81919836"
|
||||||
|
|
||||||
|
uglify-es@^3.3.9:
|
||||||
|
version "3.3.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677"
|
||||||
|
dependencies:
|
||||||
|
commander "~2.13.0"
|
||||||
|
source-map "~0.6.1"
|
||||||
|
|
||||||
uglify-js@1.2.6, uglify-js@~1.2.5:
|
uglify-js@1.2.6, uglify-js@~1.2.5:
|
||||||
version "1.2.6"
|
version "1.2.6"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-1.2.6.tgz#d354b2d3c1cf10ebc18fa78c11a28bdd9ce1580d"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-1.2.6.tgz#d354b2d3c1cf10ebc18fa78c11a28bdd9ce1580d"
|
||||||
|
@ -7216,7 +7231,7 @@ uglify-js@1.3.3:
|
||||||
version "1.3.3"
|
version "1.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-1.3.3.tgz#ddd3e98aa27f5f47e589cfb3f95cddba26096190"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-1.3.3.tgz#ddd3e98aa27f5f47e589cfb3f95cddba26096190"
|
||||||
|
|
||||||
uglify-js@2.8.29, uglify-js@^2.6:
|
uglify-js@^2.6:
|
||||||
version "2.8.29"
|
version "2.8.29"
|
||||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
|
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
Loading…
Reference in New Issue