2021-12-27 15:51:25 +05:30
|
|
|
#!/bin/bash
|
2022-04-20 22:25:48 +05:30
|
|
|
# Exit whenever one of the commands fail with a non-zero exit code
|
|
|
|
set -e
|
|
|
|
set -o pipefail
|
|
|
|
|
2021-12-21 16:54:33 +05:30
|
|
|
rm -rf target
|
2021-12-20 23:47:31 +05:30
|
|
|
yarn run vite build -c vite.sdk-assets-config.js
|
|
|
|
yarn run vite build -c vite.sdk-lib-config.js
|
2022-04-27 00:24:03 +05:30
|
|
|
yarn tsc -p tsconfig-declaration.json
|
2021-12-17 18:58:25 +05:30
|
|
|
./scripts/sdk/create-manifest.js ./target/package.json
|
2021-12-21 19:58:34 +05:30
|
|
|
mkdir target/paths
|
2022-01-12 23:01:55 +05:30
|
|
|
# this doesn't work, the ?url imports need to be in the consuming project, so disable for now
|
|
|
|
# ./scripts/sdk/transform-paths.js ./src/platform/web/sdk/paths/vite.js ./target/paths/vite.js
|
2021-12-22 20:50:54 +05:30
|
|
|
cp doc/SDK.md target/README.md
|
2021-12-21 16:54:33 +05:30
|
|
|
pushd target
|
|
|
|
pushd asset-build/assets
|
|
|
|
mv main.*.js ../../main.js
|
2022-04-13 17:49:38 +05:30
|
|
|
# Create a copy of light theme for backwards compatibility
|
|
|
|
cp theme-element-light.*.css ../../style.css
|
|
|
|
# Remove asset hash from css files
|
|
|
|
mv theme-element-light.*.css ../../theme-element-light.css
|
|
|
|
mv theme-element-dark.*.css ../../theme-element-dark.css
|
2021-12-21 16:54:33 +05:30
|
|
|
mv download-sandbox.*.html ../../download-sandbox.html
|
|
|
|
rm *.js *.wasm
|
|
|
|
mv ./* ../../
|
|
|
|
popd
|
|
|
|
rm -rf asset-build
|
|
|
|
mv lib-build/* .
|
|
|
|
rm -rf lib-build
|
|
|
|
popd
|