Make build:wasm build all wasm packages

This commit is contained in:
2026-07-09 18:46:24 +09:00
parent e4a9f80617
commit a8a46998a8
2 changed files with 8 additions and 6 deletions
+3 -2
View File
@@ -85,11 +85,12 @@ Build the WebAssembly packages before building the site:
```sh ```sh
cd site/decodal-site cd site/decodal-site
npm install npm install
npm run build:packages npm run build:wasm
npm run build npm run build
``` ```
`npm run build:wasm` writes generated runtime files into `packages/decodal-wasm/`. `npm run build:wasm` builds both generated WebAssembly packages.
`npm run build:runtime` writes generated runtime files into `packages/decodal-wasm/`.
`npm run build:tools` writes generated language tools files into `packages/decodal-language-tools/`. `npm run build:tools` writes generated language tools files into `packages/decodal-language-tools/`.
These generated files are committed so the site can be built without requiring every consumer to regenerate the wasm packages first. These generated files are committed so the site can be built without requiring every consumer to regenerate the wasm packages first.
+5 -4
View File
@@ -7,11 +7,12 @@
"dev": "astro dev --host 0.0.0.0", "dev": "astro dev --host 0.0.0.0",
"build": "astro build", "build": "astro build",
"preview": "astro preview --host 0.0.0.0", "preview": "astro preview --host 0.0.0.0",
"build:wasm": "wasm-pack build ../../crates/decodal-wasm --target web --out-dir ../../packages/decodal-wasm --release && node scripts/prepare-wasm-package.mjs", "build:runtime": "wasm-pack build ../../crates/decodal-wasm --target web --out-dir ../../packages/decodal-wasm --release && node scripts/prepare-wasm-package.mjs",
"deploy": "npm run build && node scripts/deploy-pages.mjs",
"deploy:wasm": "npm run build:wasm && npm run deploy",
"build:tools": "wasm-pack build ../../crates/decodal-language-tools --target web --out-dir ../../packages/decodal-language-tools --release && node scripts/prepare-language-tools-package.mjs", "build:tools": "wasm-pack build ../../crates/decodal-language-tools --target web --out-dir ../../packages/decodal-language-tools --release && node scripts/prepare-language-tools-package.mjs",
"build:packages": "npm run build:wasm && npm run build:tools" "build:wasm": "npm run build:runtime && npm run build:tools",
"build:packages": "npm run build:wasm",
"deploy": "npm run build && node scripts/deploy-pages.mjs",
"deploy:wasm": "npm run build:wasm && npm run deploy"
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.9.4", "@astrojs/check": "^0.9.4",