24 Star 46 Fork 11

ic / at-angular

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.sh 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
ic 提交于 2017-10-24 19:10 . update to 1.0.1
#!/usr/bin/env bash
readonly currentDir=$(cd $(dirname $0); pwd)
cd ${currentDir}
rm -rf publish
cp -r src/app/components src/__gen_components
echo 'Generating entry file using Angular compiler'
$(npm bin)/ngc -p tsconfig-build.json
rm -rf src/__gen_components
echo 'Bundling to es module'
export ROLLUP_FORMAT=es
$(npm bin)/rollup -c rollup.config.js
rm -rf publish/src/*.js
rm -rf publish/src/**/*.js
sed -e "s/from '.\//from '.\/src\//g" publish/src/index.d.ts > publish/index.d.ts
sed -e "s/\":\".\//\":\".\/src\//g" publish/src/index.metadata.json > publish/index.metadata.json
rm publish/src/index.d.ts publish/src/index.metadata.json
echo 'Transpiling es module to es5'
$(npm bin)/tsc --allowJs --importHelpers --target es5 --module es2015 --outDir publish/esm5 publish/esm15/index.js
echo 'Bundling to umd module'
export ROLLUP_FORMAT=umd
$(npm bin)/rollup -c rollup.config.js
echo 'Minifying umd module'
$(npm bin)/uglifyjs publish/bundles/at-ng.umd.js --output publish/bundles/at-ng.umd.min.js
echo 'Copying package.json'
cp package.json publish/package.json
echo 'moving styles'
cp -r src/assets/stylesheets publish/assets
JavaScript
1
https://gitee.com/icepoint1999/at-angular.git
git@gitee.com:icepoint1999/at-angular.git
icepoint1999
at-angular
at-angular
master

搜索帮助