Skip to content

Commit

Permalink
fix: fix wasm exclusion by forcing delete of gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Aug 16, 2024
1 parent 24af632 commit 3f03062
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
9 changes: 7 additions & 2 deletions packages/torii-wasm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ git clone --depth 1 https://github.com/dojoengine/dojo.c dojo.c
cd dojo.c

# Build for web (browser)
npx wasm-pack build --out-dir ../pkg/web --release --target web
npx wasm-pack build --out-dir ../dist/pkg/web --release --target web

# Build for Node.js
npx wasm-pack build --out-dir ../pkg/node --release --target nodejs
npx wasm-pack build --out-dir ../dist/pkg/node --release --target nodejs

# Find and delete .gitignore files in the specified directories
find ../dist/pkg/node -name ".gitignore" -type f -delete
find ../dist/pkg/web -name ".gitignore" -type f -delete


# Go back to the parent directory and delete the repository
cd ..
Expand Down
18 changes: 9 additions & 9 deletions packages/torii-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
"description": "Torii wasm bindings for Dojo onchain game engine",
"author": "",
"license": "MIT",
"main": "pkg/node/dojo_c.js",
"browser": "pkg/web/dojo_c.js",
"main": "dist/pkg/node/dojo_c.js",
"browser": "dist/pkg/web/dojo_c.js",
"type": "module",
"scripts": {
"build-wasm": "sh ./build.sh",
"build": "npm run build-wasm && tsc"
},
"module": "dist/pkg/web/dojo_c.js",
"types": "dist/pkg/web/dojo_c.d.ts",
"files": [
"pkg/**/*"
"dist/pkg/**/*"
],
"module": "pkg/web/dojo_c.js",
"types": "pkg/web/dojo_c.d.ts",
"sideEffects": [
"pkg/web/dojo_c.js",
"pkg/node/dojo_c.js",
"pkg/snippets/*"
"dist/pkg/web/dojo_c.js",
"dist/pkg/node/dojo_c.js",
"dist/pkg/snippets/*"
],
"devDependencies": {
"tsup": "^8.1.0",
"typescript": "^5.0.3",
"wasm-pack": "^0.12.1"
"wasm-pack": "^0.13.0"
}
}
14 changes: 12 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3f03062

Please sign in to comment.