-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathscript.sh
More file actions
executable file
·38 lines (32 loc) · 794 Bytes
/
script.sh
File metadata and controls
executable file
·38 lines (32 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# Parameter default value
test=0
while [ $# -gt 0 ]; do
case "$1" in
--test)
test=1
;;
# -a|-arg_1|--arg_1)
# arg_1="$2"
# ;;
*)
printf "***************************\n"
printf "* Error: Invalid argument.*\n"
printf "***************************\n"
exit 1
esac
shift
shift
done
npm run clean
npm run lint
tsc --project tsconfig.json
if [ $test -ne 1 ]; then
# bundleUmd
rollup dist/index.js --file dist/index.umd.js --format umd --name sayHello
# bundleUmdMin
terser --ecma 6 --compress --mangle -o dist/index.umd.min.js -- dist/index.umd.js && gzip -9 -c dist/index.umd.min.js > dist/index.umd.min.js.gz
# buildStats
cd dist
ls -lh index.umd* | tail -n +2 | awk '{print $5,$9}'
fi