diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-03-07 04:41:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-07 12:41:52 +0800 |
commit | 12babdfe20eae91de1b60a5a3cfb7db0a5a04cb0 (patch) | |
tree | c93691dc81bef781cdc80974e4353feb8123023b /test/release/buble.sh | |
parent | 397e48b97e18cf947c9c9eec0f66589cb92689a3 (diff) | |
download | tracifyjs-12babdfe20eae91de1b60a5a3cfb7db0a5a04cb0.tar.gz tracifyjs-12babdfe20eae91de1b60a5a3cfb7db0a5a04cb0.zip |
build external projects for verification testing (#4741)
Diffstat (limited to 'test/release/buble.sh')
-rwxr-xr-x | test/release/buble.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/release/buble.sh b/test/release/buble.sh new file mode 100755 index 00000000..6a14ecad --- /dev/null +++ b/test/release/buble.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +alias uglify-js=$PWD/bin/uglifyjs +UGLIFY_OPTIONS=$@ + +minify_in_situ() { + DIRS="$1" + echo '> uglify-js' $DIRS $UGLIFY_OPTIONS + for i in `find $DIRS -name '*.js'` + do + echo "$i" + uglify-js "$i" $UGLIFY_OPTIONS -o "$i" + done +} + +rm -rf tmp/buble \ +&& git clone https://github.com/bublejs/buble.git tmp/buble \ +&& cd tmp/buble \ +&& rm -rf .git/hooks \ +&& git checkout dcc5ab02c9af6ddaad94e587c4911677340ec100 \ +&& patch -l -p1 <<EOF +--- a/package.json ++++ b/package.json +@@ -29 +28,0 @@ +- "prepublish": "npm test", +@@ -67,3 +66 @@ +- "source-map-support": "^0.5.16", +- "test262": "git+https://github.com/tc39/test262.git#4f1155c566a222238fd86f179c6635ecb4c289bb", +- "test262-stream": "^1.3.0" ++ "source-map-support": "^0.5.16" +--- a/src/program/BlockStatement.js ++++ b/src/program/BlockStatement.js +@@ -309 +309 @@ export default class BlockStatement extends Node { +- let cont = false; // TODO implement proper continue... ++ let cont = !declarations; // TODO implement proper continue... +EOF +ERR=$?; if [ "$ERR" != "0" ]; then echo "Error: $ERR"; exit $ERR; fi +minify_in_situ "src" \ +&& rm -rf node_modules \ +&& npm ci \ +&& rm -rf dist \ +&& npm run build \ +&& minify_in_situ "dist" \ +&& node_modules/.bin/mocha |