move output of both lib and asset build around for coherent package

This commit is contained in:
Bruno Windels 2021-12-21 12:24:33 +01:00
parent c921091957
commit 163dae647b
2 changed files with 13 additions and 1 deletions

View File

@ -6,6 +6,5 @@
"import": "./hydrogen.es.js", "import": "./hydrogen.es.js",
"require": "./hydrogen.cjs.js" "require": "./hydrogen.cjs.js"
}, },
"files": [],
"types": "types/lib.d.ts" "types": "types/lib.d.ts"
} }

13
scripts/sdk/build.sh Executable file → Normal file
View File

@ -1,4 +1,17 @@
rm -rf target
yarn run vite build -c vite.sdk-assets-config.js yarn run vite build -c vite.sdk-assets-config.js
yarn run vite build -c vite.sdk-lib-config.js yarn run vite build -c vite.sdk-lib-config.js
yarn tsc -p tsconfig-declaration.json yarn tsc -p tsconfig-declaration.json
./scripts/sdk/create-manifest.js ./target/package.json ./scripts/sdk/create-manifest.js ./target/package.json
pushd target
pushd asset-build/assets
mv main.*.js ../../main.js
mv index.*.css ../../style.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