Skip to content

Commit

Permalink
Revert commiting build artifacts.
Browse files Browse the repository at this point in the history
Nevermind, I don't like having another copy of the wasm module in the repo. Just remember to run 'npm run wasm-opt' when making changes to the zig library.
  • Loading branch information
Senryoku committed May 1, 2024
1 parent 52b496f commit 9020329
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
zig-cache
zig-out
!zig-out/bin/smol-string.wasm

build.bat
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ zig build # Builds the wasm modules to `zig-out/lib/` by default.
```sh
cd ts-lib
npm ci # Installs Dependencies.
npm run wasm-opt # Run wasm-opt on the wasm module generated by zig and copies it for the TS library. Only needed if you made changes to the zig library.
npm run build # Builds the Typescript library to `ts-lib/dist`.
```
5 changes: 3 additions & 2 deletions ts-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "npx wasm-opt -O4 --all-features ../zig-out/bin/smol-string.wasm -o ./src/module.wasm && tsc && vite build",
"build": "tsc && vite build",
"preview": "vite preview",
"test": "vitest",
"test:chrome": "vitest --browser.name=chrome --browser.headless --config browser.vitest.config.ts",
"test:firefox": "vitest --browser.name=firefox --browser.headless --config browser.vitest.config.ts",
"test:edge": "vitest --browser.name=edge --browser.headless --config browser.vitest.config.ts",
"test:safari": "vitest --browser.name=safari --no-browser.headless --config browser.vitest.config.ts",
"bench": "vitest bench"
"bench": "vitest bench",
"wasm-opt": "wasm-opt -O4 --all-features ../zig-out/bin/smol-string.wasm -o ./src/module.wasm"
},
"main": "./dist/smol-string.js",
"exports": {
Expand Down
Binary file removed zig-out/bin/smol-string.wasm
Binary file not shown.

0 comments on commit 9020329

Please sign in to comment.