Skip to content

Commit

Permalink
fix(swc-plugin-gql): copy wasm output to dist folder and ignore target
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaubrey committed Jan 1, 2025
1 parent 427973d commit 750fa2f
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 4 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
bundle/
coverage/
docs/
target/

# private files
.*
Expand Down
12 changes: 9 additions & 3 deletions packages/swc-plugin-gql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,25 @@
"url": "https://github.com/badbatch/graphql-box"
},
"bugs": "https://github.com/badbatch/graphql-box/issues",
"main": "./target/wasm32-wasi/release/swc_plugin_graphql_box_gql.wasm",
"main": "./dist/swc_plugin_graphql_box_gql.wasm",
"types": "./types.d.ts",
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "cargo build",
"build": "pnpm run clean:dist && pnpm run compile",
"clean:deps": "del-cli ./node_modules",
"clean:dist": "del-cli ./dist",
"build-release": "cargo build --release -p swc-plugin-graphql-box-gql --target wasm32-wasi",
"copy-wasm": "copyfiles -f target/wasm32-wasi/release/swc_plugin_graphql_box_gql.wasm dist",
"lint": "rustup component add clippy && cargo clippy",
"prepack": "pnpm run target-wasm && pnpm run build-release",
"prepack": "pnpm run clean:dist && pnpm run target-wasm && pnpm run build-release && pnpm run copy-wasm",
"target-wasm": "rustup target add wasm32-wasi",
"test": "cargo test"
},
"devDependencies": {
"copyfiles": "^2.4.1"
},
"keywords": [
"client",
"graphql",
Expand Down
104 changes: 103 additions & 1 deletion pnpm-lock.yaml

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

0 comments on commit 750fa2f

Please sign in to comment.