2021-12-27 11:21:25 +01:00
|
|
|
#!/bin/bash
|
2021-12-21 12:24:33 +01:00
|
|
|
rm -rf target
|
2021-12-20 19:17:31 +01:00
|
|
|
yarn run vite build -c vite.sdk-assets-config.js
|
|
|
|
yarn run vite build -c vite.sdk-lib-config.js
|
2021-12-17 14:28:25 +01:00
|
|
|
yarn tsc -p tsconfig-declaration.json
|
|
|
|
./scripts/sdk/create-manifest.js ./target/package.json
|
2021-12-21 15:28:34 +01:00
|
|
|
mkdir target/paths
|
2022-01-12 18:31:55 +01:00
|
|
|
# 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 16:20:54 +01:00
|
|
|
cp doc/SDK.md target/README.md
|
2021-12-21 12:24:33 +01:00
|
|
|
pushd target
|
|
|
|
pushd asset-build/assets
|
|
|
|
mv main.*.js ../../main.js
|
2022-04-13 14:19:38 +02:00
|
|
|
# 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 12:24:33 +01:00
|
|
|
mv download-sandbox.*.html ../../download-sandbox.html
|
|
|
|
rm *.js *.wasm
|
|
|
|
mv ./* ../../
|
|
|
|
popd
|
|
|
|
rm -rf asset-build
|
|
|
|
mv lib-build/* .
|
|
|
|
rm -rf lib-build
|
|
|
|
popd
|