1 Star 0 Fork 11

workor/at-angular

forked from ic/at-angular 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.sh 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
ic 提交于 2017-10-17 20:14 . move file to code
#!/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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/cxd520/at-angular.git
git@gitee.com:cxd520/at-angular.git
cxd520
at-angular
at-angular
master

搜索帮助