-
Notifications
You must be signed in to change notification settings - Fork 12
/
build_bootstrap.sh
executable file
·14 lines (14 loc) · 1.47 KB
/
build_bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
rm -rf dist/tmp
rm -rf dist/ng-vdom/bootstrap
yarn ngc -p projects/bootstrap/tsconfig.lib.json
mv dist/bootstrap-tmp/projects/ng-vdom-bootstrap/src/lib/bootstrap.module.js dist/tmp/projects/ng-vdom-bootstrap/src/lib/bootstrap.module.internal.js
sed -i -e 's/bootstrap.module/bootstrap.module.internal/g' dist/tmp/projects/ng-vdom-bootstrap/src/lib/bootstrap.module.ngfactory.js
printf 'import { VDomBootstrapModule } from "./bootstrap.module.internal";\nimport { VDomBootstrapModuleNgFactory } from "./bootstrap.module.ngfactory";\nVDomBootstrapModule.ngFactory = VDomBootstrapModuleNgFactory;\nexport * from "./bootstrap.module.internal";\n' > dist/tmp/projects/ng-vdom-bootstrap/src/lib/bootstrap.module.js
mkdir -p dist/ng-vdom/bootstrap/lib
cp dist/tmp/projects/ng-vdom-bootstrap/*/*.d.ts dist/ng-vdom/bootstrap/
cp dist/tmp/projects/ng-vdom-bootstrap/src/*/*.d.ts dist/ng-vdom/bootstrap/lib/
yarn rollup --config rollup.config.js
yarn tsc --allowJs --skipLibCheck --target es5 --module es2015 --outDir dist/ng-vdom/bootstrap/fesm5 dist/ng-vdom/bootstrap/fesm2015/bootstrap.js
yarn rollup --config rollup.config.js --input dist/ng-vdom/bootstrap/fesm5/bootstrap.js --output.format umd --output.file dist/ng-vdom/bundles/ng-vdom-bootstrap.umd.js
yarn rollup --config rollup.config.js --input dist/ng-vdom/bootstrap/fesm5/bootstrap.js --output.format umd --output.file dist/ng-vdom/bundles/ng-vdom-bootstrap.umd.min.js --environment UGLIFY
cp projects/ng-vdom-bootstrap/package.json dist/ng-vdom/bootstrap/