mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 19:45:05 +01:00
5f8a171c2c
- Fix `svg-colorizer` throwing errors with Windows file paths - Fix `css-url-parser` swallowing errors because it was `async` - Fail SDK build script (`yarn build:sdk`, `build.sh`) overall when some commands are failing
31 lines
1012 B
Bash
Executable File
31 lines
1012 B
Bash
Executable File
#!/bin/bash
|
|
# Exit whenever one of the commands fail with a non-zero exit code
|
|
set -e
|
|
set -o pipefail
|
|
|
|
rm -rf target
|
|
yarn run vite build -c vite.sdk-assets-config.js
|
|
yarn run vite build -c vite.sdk-lib-config.js
|
|
yarn tsc -p tsconfig-declaration.json
|
|
./scripts/sdk/create-manifest.js ./target/package.json
|
|
mkdir target/paths
|
|
# 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
|
|
cp doc/SDK.md target/README.md
|
|
pushd target
|
|
pushd asset-build/assets
|
|
mv main.*.js ../../main.js
|
|
# 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
|
|
mv download-sandbox.*.html ../../download-sandbox.html
|
|
rm *.js *.wasm
|
|
mv ./* ../../
|
|
popd
|
|
rm -rf asset-build
|
|
mv lib-build/* .
|
|
rm -rf lib-build
|
|
popd
|