2020-10-26 20:05:39 +08:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
|
|
|
|
|
2021-04-19 11:36:28 +08:00
|
|
|
|
export NODE_ENV=production
|
|
|
|
|
|
2020-10-26 20:05:39 +08:00
|
|
|
|
rm -rf lib
|
|
|
|
|
rm -rf output
|
|
|
|
|
|
2021-10-13 12:31:11 +08:00
|
|
|
|
echo "===fis release==="
|
2021-02-02 14:38:12 +08:00
|
|
|
|
./node_modules/.bin/fis3 release publish -c
|
2020-10-26 20:05:39 +08:00
|
|
|
|
rm -rf lib/node_modules
|
|
|
|
|
|
|
|
|
|
# 生成 sdk
|
2021-10-13 12:31:11 +08:00
|
|
|
|
echo "===fis sdk==="
|
2021-02-02 14:38:34 +08:00
|
|
|
|
rm -rf sdk && ./node_modules/.bin/fis3 release publish-sdk -c
|
2020-10-26 20:05:39 +08:00
|
|
|
|
|
2020-12-29 22:49:40 +08:00
|
|
|
|
cp -r node_modules/monaco-editor/min/vs/base/browser sdk/thirds/monaco-editor/min/vs/base
|
|
|
|
|
|
2021-10-13 12:31:11 +08:00
|
|
|
|
echo "===postcss ie11==="
|
2021-11-05 10:16:30 +08:00
|
|
|
|
# 生成去掉变量的 css,动画设置为零
|
|
|
|
|
echo ':root { --animation-duration: 0s;}' >> sdk/ie11-patch.css
|
|
|
|
|
cat sdk/sdk.css sdk/ie11-patch.css | ./node_modules/.bin/postcss > sdk/sdk-ie11.css
|
|
|
|
|
cat sdk/ang.css sdk/ie11-patch.css | ./node_modules/.bin/postcss > sdk/ang-ie11.css
|
|
|
|
|
cat sdk/dark.css sdk/ie11-patch.css | ./node_modules/.bin/postcss > sdk/dark-ie11.css
|
|
|
|
|
cat sdk/antd.css sdk/ie11-patch.css | ./node_modules/.bin/postcss > sdk/antd-ie11.css
|
2020-12-21 10:08:40 +08:00
|
|
|
|
|
2021-08-18 16:21:35 +08:00
|
|
|
|
# 默认变成 cxd 了,所以要拷贝一份兼容之前的引用
|
|
|
|
|
cp sdk/sdk.css sdk/cxd.css
|
|
|
|
|
cp sdk/sdk-ie11.css sdk/cxd-ie11.css
|
|
|
|
|
|
2021-01-10 11:40:26 +08:00
|
|
|
|
cp ./lib/helper.css sdk/helper.css
|
2021-09-14 16:00:54 +08:00
|
|
|
|
cp ./lib/helper.css.map sdk/helper.css.map
|
2021-11-18 11:11:53 +08:00
|
|
|
|
cp examples/static/iconfont.* sdk/
|
2021-01-07 23:35:03 +08:00
|
|
|
|
|
2021-09-30 11:53:46 +08:00
|
|
|
|
mkdir sdk/locale
|
|
|
|
|
|
2021-10-13 12:31:11 +08:00
|
|
|
|
echo "===sdk locale==="
|
2021-09-30 11:53:46 +08:00
|
|
|
|
node scripts/generate-sdk-locale.js src/locale/de-DE.ts > sdk/locale/de-DE.js
|
|
|
|
|
|
2020-10-26 20:05:39 +08:00
|
|
|
|
# 生成 .d.ts 文件
|
2021-10-13 12:31:11 +08:00
|
|
|
|
echo "===generate .d.ts==="
|
2021-09-24 13:20:27 +08:00
|
|
|
|
./node_modules/.bin/tsc --declaration --emitDeclarationOnly --outDir ./lib --project ./tsconfig-for-declaration.json
|
2020-10-26 20:05:39 +08:00
|
|
|
|
|
2021-10-13 12:31:11 +08:00
|
|
|
|
echo "===build-schemas==="
|
2020-10-26 20:05:39 +08:00
|
|
|
|
npm run build-schemas
|