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-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-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
|
|
|
|
|
2020-12-21 10:08:40 +08:00
|
|
|
# 生成去掉变量的 css
|
2021-01-14 17:23:28 +08:00
|
|
|
./node_modules/.bin/postcss sdk/sdk.css >sdk/sdk-ie11.css
|
|
|
|
./node_modules/.bin/postcss sdk/cxd.css >sdk/cxd-ie11.css
|
|
|
|
./node_modules/.bin/postcss sdk/dark.css >sdk/dark-ie11.css
|
2021-01-25 17:22:11 +08:00
|
|
|
./node_modules/.bin/postcss sdk/antd.css >sdk/antd-ie11.css
|
2020-12-21 10:08:40 +08:00
|
|
|
|
2021-01-10 11:40:26 +08:00
|
|
|
cp ./lib/helper.css sdk/helper.css
|
2021-01-14 17:23:28 +08:00
|
|
|
cp examples/static/iconfont.css sdk/
|
|
|
|
cp examples/static/iconfont.eot sdk/
|
2021-01-07 23:35:03 +08:00
|
|
|
|
2020-10-26 20:05:39 +08:00
|
|
|
# 生成 .d.ts 文件
|
|
|
|
./node_modules/.bin/tsc --allowJs --declaration
|
|
|
|
|
|
|
|
cd output
|
|
|
|
|
|
|
|
for f in $(find . -name "*.d.ts"); do
|
|
|
|
mkdir -p ../lib/$(dirname $f) && mv $f ../lib/$(dirname $f)
|
|
|
|
done
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
rm -rf output
|
|
|
|
|
|
|
|
npm run build-schemas
|