Skip to content

Commit 20f5c9d

Browse files
committed
.
1 parent dd7071b commit 20f5c9d

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
bun-version: 1.3.4
1414
- uses: dtolnay/rust-toolchain@stable
1515
with:
16-
components: rustfmt,wasm-pack
16+
targets: wasm32-unknown-unknown
17+
components: rustfmt
1718

1819
- run: bun install --frozen-lockfile
1920

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ build
1010
target
1111
packages/snk-js/*
1212
!packages/snk-js/README.md
13+
!packages/snk-js/package.json
1314
!packages/snk-js/__tests__

packages/demo3/dev.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ console.log(`Listening on ${server.url}`);
2828
"../../node_modules/wasm-pack/run.js",
2929
);
3030
const cwd = path.resolve(__dirname, "../../cargo/snk-js");
31+
const gitIgnore = path.resolve(__dirname, "../snk-js/.gitignore");
3132
childProcess.execSync(
32-
`${wasmPackFile} build --dev --target web --out-dir ../../packages/snk-js`,
33+
`${wasmPackFile} build --dev --target web --out-dir ../../packages/snk-js && rm ${gitIgnore}`,
3334
{ cwd },
3435
);
3536
};

packages/snk-js/package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "snk-js",
3+
"type": "module",
4+
"collaborators": [
5+
"platane"
6+
],
7+
"version": "1.0.0",
8+
"files": [
9+
"snk_js_bg.wasm",
10+
"snk_js.js",
11+
"snk_js.d.ts"
12+
],
13+
"main": "snk_js.js",
14+
"types": "snk_js.d.ts",
15+
"sideEffects": [
16+
"./snippets/*"
17+
]
18+
}

0 commit comments

Comments
 (0)