-
Notifications
You must be signed in to change notification settings - Fork 23
/
build-demo
executable file
·27 lines (24 loc) · 1.46 KB
/
build-demo
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
declare -a bundles=("./node_modules/@angular/core/bundles/core.umd.js"
"./node_modules/@angular/compiler/bundles/compiler.umd.js"
"./node_modules/@angular/common/bundles/common.umd.js"
"./node_modules/@angular/platform-browser/bundles/platform-browser.umd.js"
"./node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js"
"./node_modules/systemjs/dist/system.src.js"
"./node_modules/zone.js/dist/zone.min.js"
"./node_modules/core-js/client/shim.min.js"
"./node_modules/rxjs/bundles/Rx.js"
"./node_modules/ts-helpers/index.js"
"./node_modules/tslib/tslib.js"
)
rm -rf demo/vendor
mkdir demo/vendor
for i in "${bundles[@]}"
do
cp $i demo/vendor
done
rm -rf dist && ./node_modules/.bin/ts-node tools/inline-styles.ts && ./node_modules/.bin/tsc -p tsconfig-esm.json && ./node_modules/.bin/rollup -c rollup.config.js dist/ngresizable.module.js > dist/ngresizable.bundle.js && cp package.json dist && ./node_modules/.bin/ts-node tools/cleanup.ts && ./node_modules/.bin/ngc && cp README.md dist
npm run build:demo
cp dist/* demo/dist/
./node_modules/.bin/rollup -c rollup.demo-config.js demo/dist/demo/src/main.js > demo/main.bundle.js
uglifyjs demo/main.bundle.js --screw-ie8 --compress --mangle --output demo/main.bundle.min.js
npm run postbuild