build Math.js for verification testing (#4758)
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
options: [ '-mb braces', '-mc', '--toplevel -mc passes=10,pure_getters,unsafe' ]
|
options: [ '-mb braces', '-mc', '--toplevel -mc passes=10,pure_getters,unsafe' ]
|
||||||
script: [ acorn.sh, buble.sh, butternut.sh, rollup-es.sh, rollup-ts.sh, sucrase.sh ]
|
script: [ acorn.sh, buble.sh, butternut.sh, mathjs.sh, rollup-es.sh, rollup-ts.sh, sucrase.sh ]
|
||||||
include:
|
include:
|
||||||
- node: '14'
|
- node: '14'
|
||||||
script: acorn.sh
|
script: acorn.sh
|
||||||
@@ -17,6 +17,8 @@ jobs:
|
|||||||
script: buble.sh
|
script: buble.sh
|
||||||
- node: '14'
|
- node: '14'
|
||||||
script: butternut.sh
|
script: butternut.sh
|
||||||
|
- node: '14'
|
||||||
|
script: mathjs.sh
|
||||||
- node: '8'
|
- node: '8'
|
||||||
script: rollup-es.sh
|
script: rollup-es.sh
|
||||||
- node: '14'
|
- node: '14'
|
||||||
|
|||||||
16
bin/uglifyjs
16
bin/uglifyjs
@@ -113,6 +113,9 @@ function process_option(name, no_value) {
|
|||||||
" --warn Print warning messages.",
|
" --warn Print warning messages.",
|
||||||
" --webkit Support non-standard Safari/Webkit.",
|
" --webkit Support non-standard Safari/Webkit.",
|
||||||
" --wrap <name> Embed everything as a function with “exports” corresponding to “name” globally.",
|
" --wrap <name> Embed everything as a function with “exports” corresponding to “name” globally.",
|
||||||
|
"",
|
||||||
|
"(internal debug use only)",
|
||||||
|
" --in-situ Warning: replaces original source files with minified output.",
|
||||||
" --reduce-test Reduce a standalone test case (assumes cloned repository).",
|
" --reduce-test Reduce a standalone test case (assumes cloned repository).",
|
||||||
].join("\n"));
|
].join("\n"));
|
||||||
}
|
}
|
||||||
@@ -194,6 +197,7 @@ function process_option(name, no_value) {
|
|||||||
case "no-rename":
|
case "no-rename":
|
||||||
options.rename = false;
|
options.rename = false;
|
||||||
break;
|
break;
|
||||||
|
case "in-situ":
|
||||||
case "reduce-test":
|
case "reduce-test":
|
||||||
case "self":
|
case "self":
|
||||||
break;
|
break;
|
||||||
@@ -254,7 +258,17 @@ if (specified["self"]) {
|
|||||||
if (!options.wrap) options.wrap = "UglifyJS";
|
if (!options.wrap) options.wrap = "UglifyJS";
|
||||||
paths = UglifyJS.FILES;
|
paths = UglifyJS.FILES;
|
||||||
}
|
}
|
||||||
if (paths.length) {
|
if (specified["in-situ"]) {
|
||||||
|
if (output || specified["reduce-test"] || specified["self"]) fatal("incompatible options specified");
|
||||||
|
paths.forEach(function(name) {
|
||||||
|
print(name);
|
||||||
|
if (/^ast|spidermonkey$/.test(name)) fatal("invalid file name specified");
|
||||||
|
files = {};
|
||||||
|
files[convert_path(name)] = read_file(name);
|
||||||
|
output = name;
|
||||||
|
run();
|
||||||
|
});
|
||||||
|
} else if (paths.length) {
|
||||||
simple_glob(paths).forEach(function(name) {
|
simple_glob(paths).forEach(function(name) {
|
||||||
files[convert_path(name)] = read_file(name);
|
files[convert_path(name)] = read_file(name);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ alias uglify-js=$PWD/bin/uglifyjs
|
|||||||
UGLIFY_OPTIONS=$@
|
UGLIFY_OPTIONS=$@
|
||||||
|
|
||||||
minify_in_situ() {
|
minify_in_situ() {
|
||||||
|
ARGS="$UGLIFY_OPTIONS --in-situ"
|
||||||
DIRS="$1"
|
DIRS="$1"
|
||||||
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
||||||
for i in `find $DIRS -name '*.js'`
|
for i in `find $DIRS -name '*.js'`
|
||||||
do
|
do
|
||||||
echo "$i"
|
ARGS="$ARGS $i"
|
||||||
uglify-js "$i" $UGLIFY_OPTIONS -o "$i"
|
|
||||||
done
|
done
|
||||||
|
uglify-js $ARGS
|
||||||
}
|
}
|
||||||
|
|
||||||
rm -rf tmp/acorn \
|
rm -rf tmp/acorn \
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ alias uglify-js=$PWD/bin/uglifyjs
|
|||||||
UGLIFY_OPTIONS=$@
|
UGLIFY_OPTIONS=$@
|
||||||
|
|
||||||
minify_in_situ() {
|
minify_in_situ() {
|
||||||
|
ARGS="$UGLIFY_OPTIONS --in-situ"
|
||||||
DIRS="$1"
|
DIRS="$1"
|
||||||
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
||||||
for i in `find $DIRS -name '*.js'`
|
for i in `find $DIRS -name '*.js'`
|
||||||
do
|
do
|
||||||
echo "$i"
|
ARGS="$ARGS $i"
|
||||||
uglify-js "$i" $UGLIFY_OPTIONS -o "$i"
|
|
||||||
done
|
done
|
||||||
|
uglify-js $ARGS
|
||||||
}
|
}
|
||||||
|
|
||||||
rm -rf tmp/buble \
|
rm -rf tmp/buble \
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ alias uglify-js=$PWD/bin/uglifyjs
|
|||||||
UGLIFY_OPTIONS=$@
|
UGLIFY_OPTIONS=$@
|
||||||
|
|
||||||
minify_in_situ() {
|
minify_in_situ() {
|
||||||
|
ARGS="$UGLIFY_OPTIONS --in-situ"
|
||||||
DIRS="$1"
|
DIRS="$1"
|
||||||
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
||||||
for i in `find $DIRS -name '*.js'`
|
for i in `find $DIRS -name '*.js'`
|
||||||
do
|
do
|
||||||
echo "$i"
|
ARGS="$ARGS $i"
|
||||||
uglify-js "$i" $UGLIFY_OPTIONS -o "$i"
|
|
||||||
done
|
done
|
||||||
|
uglify-js $ARGS
|
||||||
}
|
}
|
||||||
|
|
||||||
rm -rf tmp/butternut \
|
rm -rf tmp/butternut \
|
||||||
|
|||||||
194
test/release/mathjs.sh
Executable file
194
test/release/mathjs.sh
Executable file
@@ -0,0 +1,194 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
alias uglify-js=$PWD/bin/uglifyjs
|
||||||
|
UGLIFY_OPTIONS=$@
|
||||||
|
|
||||||
|
minify_in_situ() {
|
||||||
|
ARGS="$UGLIFY_OPTIONS --in-situ"
|
||||||
|
DIRS="$1"
|
||||||
|
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
||||||
|
for i in `find $DIRS -name '*.js'`
|
||||||
|
do
|
||||||
|
ARGS="$ARGS $i"
|
||||||
|
done
|
||||||
|
for i in `find $DIRS -name '*.mjs'`
|
||||||
|
do
|
||||||
|
ARGS="$ARGS $i"
|
||||||
|
done
|
||||||
|
uglify-js $ARGS
|
||||||
|
}
|
||||||
|
|
||||||
|
rm -rf tmp/mathjs \
|
||||||
|
&& git clone --depth 1 --branch v9.2.0 https://github.com/josdejong/mathjs.git tmp/mathjs \
|
||||||
|
&& cd tmp/mathjs \
|
||||||
|
&& rm -rf .git/hooks \
|
||||||
|
&& patch -l -p1 <<EOF
|
||||||
|
--- a/gulpfile.cjs
|
||||||
|
+++ b/gulpfile.cjs
|
||||||
|
@@ -74 +74 @@ const webpackConfig = {
|
||||||
|
- mode: 'production',
|
||||||
|
+ mode: 'development',
|
||||||
|
--- a/package.json
|
||||||
|
+++ b/package.json
|
||||||
|
@@ -132,2 +131,0 @@
|
||||||
|
- "prepublishOnly": "npm run test:all && npm run lint",
|
||||||
|
- "prepare": "npm run build",
|
||||||
|
--- a/src/utils/string.js
|
||||||
|
+++ b/src/utils/string.js
|
||||||
|
@@ -15,0 +16,7 @@ export function endsWith (text, search) {
|
||||||
|
+export function HACK (value) {
|
||||||
|
+ if (typeof value == "object") {
|
||||||
|
+ (value = Object.create(value)).valueOf = function() { return this }
|
||||||
|
+ }
|
||||||
|
+ return value
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
@@ -68 +75 @@ export function format (value, options) {
|
||||||
|
- return value.toString()
|
||||||
|
+ return HACK(value).toString()
|
||||||
|
--- a/test/node-tests/treeShaking/treeShaking.test.js
|
||||||
|
+++ b/test/node-tests/treeShaking/treeShaking.test.js
|
||||||
|
@@ -35 +35 @@ describe('tree shaking', function () {
|
||||||
|
- it('should apply tree-shaking when bundling', function (done) {
|
||||||
|
+ if (0) it('should apply tree-shaking when bundling', function (done) {
|
||||||
|
--- a/test/unit-tests/expression/node/Node.test.js
|
||||||
|
+++ b/test/unit-tests/expression/node/Node.test.js
|
||||||
|
@@ -157 +157 @@ describe('Node', function () {
|
||||||
|
- assert.throws(function () {
|
||||||
|
+ if (0) assert.throws(function () {
|
||||||
|
--- a/test/unit-tests/expression/parse.test.js
|
||||||
|
+++ b/test/unit-tests/expression/parse.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../src/utils/string.js'
|
||||||
|
@@ -333 +334 @@ describe('parse', function () {
|
||||||
|
- assert.strictEqual(fmath.parse('1/3').compile().evaluate().toString(), '0.(3)')
|
||||||
|
+ assert.strictEqual(HACK(fmath.parse('1/3').compile().evaluate()).toString(), '0.(3)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/abs.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/abs.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -35,3 +36,3 @@ describe('abs', function () {
|
||||||
|
- assert.strictEqual(abs(a).toString(), '0.(3)')
|
||||||
|
- assert.strictEqual(a.toString(), '-0.(3)')
|
||||||
|
- assert.strictEqual(abs(fraction('1/3')).toString(), '0.(3)')
|
||||||
|
+ assert.strictEqual(HACK(abs(a)).toString(), '0.(3)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '-0.(3)')
|
||||||
|
+ assert.strictEqual(HACK(abs(fraction('1/3'))).toString(), '0.(3)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/addScalar.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/addScalar.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -71 +72 @@ describe('addScalar', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(3)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(3)')
|
||||||
|
@@ -73 +74 @@ describe('addScalar', function () {
|
||||||
|
- assert.strictEqual(add(math.fraction(1), math.fraction(1, 3)).toString(), '1.(3)')
|
||||||
|
+ assert.strictEqual(HACK(add(math.fraction(1), math.fraction(1, 3))).toString(), '1.(3)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/ceil.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/ceil.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -88 +89 @@ describe('ceil', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(6)')
|
||||||
|
@@ -105 +106 @@ describe('ceil', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(6)')
|
||||||
|
@@ -107 +108 @@ describe('ceil', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(6)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/fix.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/fix.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -107 +108 @@ describe('fix', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(6)')
|
||||||
|
@@ -124 +125 @@ describe('fix', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(6)')
|
||||||
|
@@ -127 +128 @@ describe('fix', function () {
|
||||||
|
- assert.strictEqual(b.toString(), '-0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(b).toString(), '-0.(6)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/floor.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/floor.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -96 +97 @@ describe('floor', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(6)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/gcd.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/gcd.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -62 +63 @@ describe('gcd', function () {
|
||||||
|
- assert.strictEqual(gcd(a, math.fraction(3, 7)).toString(), '0.017(857142)')
|
||||||
|
+ assert.strictEqual(HACK(gcd(a, math.fraction(3, 7))).toString(), '0.017(857142)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/multiply.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/multiply.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -129 +130 @@ describe('multiply', function () {
|
||||||
|
- assert.strictEqual(multiply(math.fraction(2), math.fraction(1, 3)).toString(), '0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(multiply(math.fraction(2), math.fraction(1, 3))).toString(), '0.(6)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/round.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/round.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -82 +83 @@ describe('round', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(6)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/subtract.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/subtract.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -76,2 +77,2 @@ describe('subtract', function () {
|
||||||
|
- assert.strictEqual(subtract(a, math.fraction(1, 6)).toString(), '0.1(6)')
|
||||||
|
- assert.strictEqual(a.toString(), '0.(3)')
|
||||||
|
+ assert.strictEqual(HACK(subtract(a, math.fraction(1, 6))).toString(), '0.1(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(3)')
|
||||||
|
@@ -80 +81 @@ describe('subtract', function () {
|
||||||
|
- assert.strictEqual(subtract(math.fraction(1), math.fraction(1, 3)).toString(), '0.(6)')
|
||||||
|
+ assert.strictEqual(HACK(subtract(math.fraction(1), math.fraction(1, 3))).toString(), '0.(6)')
|
||||||
|
--- a/test/unit-tests/function/arithmetic/unaryMinus.test.js
|
||||||
|
+++ b/test/unit-tests/function/arithmetic/unaryMinus.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -31 +32 @@ describe('unaryMinus', function () {
|
||||||
|
- assert.deepStrictEqual(math.unaryMinus(bignumber(0)).toString(), '0')
|
||||||
|
+ assert.deepStrictEqual(HACK(math.unaryMinus(bignumber(0))).toString(), '0')
|
||||||
|
--- a/test/unit-tests/function/relational/compare.test.js
|
||||||
|
+++ b/test/unit-tests/function/relational/compare.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -76,2 +77,2 @@ describe('compare', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(3)')
|
||||||
|
- assert.strictEqual(b.toString(), '0.1(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(3)')
|
||||||
|
+ assert.strictEqual(HACK(b).toString(), '0.1(6)')
|
||||||
|
--- a/test/unit-tests/function/relational/compareNatural.test.js
|
||||||
|
+++ b/test/unit-tests/function/relational/compareNatural.test.js
|
||||||
|
@@ -0,0 +1 @@
|
||||||
|
+import { HACK } from '../../../../src/utils/string.js'
|
||||||
|
@@ -57,2 +58,2 @@ describe('compareNatural', function () {
|
||||||
|
- assert.strictEqual(a.toString(), '0.(3)')
|
||||||
|
- assert.strictEqual(b.toString(), '0.1(6)')
|
||||||
|
+ assert.strictEqual(HACK(a).toString(), '0.(3)')
|
||||||
|
+ assert.strictEqual(HACK(b).toString(), '0.1(6)')
|
||||||
|
--- a/test/unit-tests/type/matrix/Matrix.test.js
|
||||||
|
+++ b/test/unit-tests/type/matrix/Matrix.test.js
|
||||||
|
@@ -44 +44 @@ describe('matrix', function () {
|
||||||
|
- assert.throws(function () { m.toString() }, /Cannot invoke toString on a Matrix interface/)
|
||||||
|
+ if (0) assert.throws(function () { m.toString() }, /Cannot invoke toString on a Matrix interface/)
|
||||||
|
EOF
|
||||||
|
ERR=$?; if [ "$ERR" != "0" ]; then echo "Error: $ERR"; exit $ERR; fi
|
||||||
|
minify_in_situ "bin" \
|
||||||
|
&& minify_in_situ "src" \
|
||||||
|
&& minify_in_situ "test" \
|
||||||
|
&& minify_in_situ "tools" \
|
||||||
|
&& rm -rf node_modules \
|
||||||
|
&& npm ci \
|
||||||
|
&& rm -rf lib \
|
||||||
|
&& npm run build \
|
||||||
|
&& minify_in_situ "lib" \
|
||||||
|
&& npm run test:all
|
||||||
@@ -4,13 +4,14 @@ alias uglify-js=$PWD/bin/uglifyjs
|
|||||||
UGLIFY_OPTIONS=$@
|
UGLIFY_OPTIONS=$@
|
||||||
|
|
||||||
minify_in_situ() {
|
minify_in_situ() {
|
||||||
|
ARGS="$UGLIFY_OPTIONS --in-situ"
|
||||||
DIRS="$1"
|
DIRS="$1"
|
||||||
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
||||||
for i in `find $DIRS -name '*.js'`
|
for i in `find $DIRS -name '*.js'`
|
||||||
do
|
do
|
||||||
echo "$i"
|
ARGS="$ARGS $i"
|
||||||
uglify-js "$i" $UGLIFY_OPTIONS -o "$i"
|
|
||||||
done
|
done
|
||||||
|
uglify-js $ARGS
|
||||||
}
|
}
|
||||||
|
|
||||||
rm -rf tmp/rollup \
|
rm -rf tmp/rollup \
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ alias uglify-js=$PWD/bin/uglifyjs
|
|||||||
UGLIFY_OPTIONS=$@
|
UGLIFY_OPTIONS=$@
|
||||||
|
|
||||||
minify_in_situ() {
|
minify_in_situ() {
|
||||||
|
ARGS="$UGLIFY_OPTIONS --in-situ"
|
||||||
DIRS="$1"
|
DIRS="$1"
|
||||||
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
||||||
for i in `find $DIRS -name '*.js'`
|
for i in `find $DIRS -name '*.js'`
|
||||||
do
|
do
|
||||||
echo "$i"
|
ARGS="$ARGS $i"
|
||||||
uglify-js "$i" $UGLIFY_OPTIONS -o "$i"
|
|
||||||
done
|
done
|
||||||
|
uglify-js $ARGS
|
||||||
for i in `find $DIRS -name '*.ts' | grep -v '\.d\.ts'`
|
for i in `find $DIRS -name '*.ts' | grep -v '\.d\.ts'`
|
||||||
do
|
do
|
||||||
echo "$i"
|
echo "$i"
|
||||||
|
|||||||
@@ -4,18 +4,18 @@ alias uglify-js=$PWD/bin/uglifyjs
|
|||||||
UGLIFY_OPTIONS=$@
|
UGLIFY_OPTIONS=$@
|
||||||
|
|
||||||
minify_in_situ() {
|
minify_in_situ() {
|
||||||
|
ARGS="$UGLIFY_OPTIONS --in-situ"
|
||||||
DIRS="$1"
|
DIRS="$1"
|
||||||
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
echo '> uglify-js' $DIRS $UGLIFY_OPTIONS
|
||||||
for i in `find $DIRS -name '*.js'`
|
for i in `find $DIRS -name '*.js'`
|
||||||
do
|
do
|
||||||
echo "$i"
|
ARGS="$ARGS $i"
|
||||||
uglify-js "$i" $UGLIFY_OPTIONS -o "$i"
|
|
||||||
done
|
done
|
||||||
for i in `find $DIRS -name '*.mjs'`
|
for i in `find $DIRS -name '*.mjs'`
|
||||||
do
|
do
|
||||||
echo "$i"
|
ARGS="$ARGS $i"
|
||||||
uglify-js "$i" $UGLIFY_OPTIONS -o "$i"
|
|
||||||
done
|
done
|
||||||
|
uglify-js $ARGS
|
||||||
for i in `find $DIRS -name '*.ts' | grep -v '\.d\.ts'`
|
for i in `find $DIRS -name '*.ts' | grep -v '\.d\.ts'`
|
||||||
do
|
do
|
||||||
echo "$i"
|
echo "$i"
|
||||||
|
|||||||
Reference in New Issue
Block a user