Clarify site build and deploy scripts
This commit is contained in:
@@ -83,8 +83,10 @@ npm run build
|
||||
```
|
||||
|
||||
`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-codemirror/wasm/`.
|
||||
`npm run build:wasm:runtime` writes generated runtime files into `packages/decodal-wasm/`.
|
||||
`npm run build:wasm:formatter` writes generated formatter files into `packages/decodal-codemirror/wasm/`.
|
||||
`npm run build` builds only the static site from the current package files.
|
||||
Use `npm run build:all` to regenerate both WebAssembly packages and then build the static site in one command.
|
||||
|
||||
These generated files are committed so the site can be built without requiring every consumer to regenerate the wasm packages first.
|
||||
|
||||
@@ -158,7 +160,7 @@ CLOUDFLARE_PROJECT_NAME=my-pages-project npm run deploy
|
||||
If the committed WASM package must be regenerated before deploy, use:
|
||||
|
||||
```sh
|
||||
npm run deploy:wasm
|
||||
npm run deploy:all
|
||||
```
|
||||
|
||||
## Tree-sitter grammar
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
"scripts": {
|
||||
"dev": "astro dev --host 0.0.0.0",
|
||||
"build": "astro build",
|
||||
"build:all": "npm run build:wasm && npm run build",
|
||||
"build:wasm": "npm run build:wasm:runtime && npm run build:wasm:formatter",
|
||||
"build:wasm:runtime": "wasm-pack build ../../crates/decodal-wasm --target web --out-dir ../../packages/decodal-wasm --release && node scripts/prepare-wasm-package.mjs",
|
||||
"build:wasm:formatter": "wasm-pack build ../../crates/decodal-language-tools --target web --out-dir ../../packages/decodal-codemirror/wasm --release && node scripts/prepare-codemirror-wasm.mjs",
|
||||
"test": "node --test src/scripts/*.test.mjs",
|
||||
"preview": "astro preview --host 0.0.0.0",
|
||||
"build:runtime": "wasm-pack build ../../crates/decodal-wasm --target web --out-dir ../../packages/decodal-wasm --release && node scripts/prepare-wasm-package.mjs",
|
||||
"build:tools": "wasm-pack build ../../crates/decodal-language-tools --target web --out-dir ../../packages/decodal-codemirror/wasm --release && node scripts/prepare-codemirror-wasm.mjs",
|
||||
"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"
|
||||
"deploy:all": "npm run build:wasm && npm run deploy"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.4",
|
||||
|
||||
@@ -179,7 +179,9 @@ writeFileSync(
|
||||
{
|
||||
name: '@hare/decodal-wasm',
|
||||
version: '0.1.4',
|
||||
license: 'MIT OR Apache-2.0',
|
||||
// JSR's publisher currently accepts a single recognized identifier.
|
||||
// npm package metadata remains dual-licensed and both files are included.
|
||||
license: 'MIT',
|
||||
exports: './mod.ts',
|
||||
publish: {
|
||||
include: [
|
||||
|
||||
Reference in New Issue
Block a user