Skip to content

Commit

Permalink
faster dev init, fix wasm clean (#985)
Browse files Browse the repository at this point in the history
  • Loading branch information
turbocrime authored Apr 26, 2024
1 parent 3148375 commit 5b21ff1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ node_modules

# testing
coverage
vite.config.ts.timestamp-*-*.mjs
vite*.config.ts.timestamp-*-*.mjs

# build output
.next/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"all-check": "pnpm clean && pnpm install && pnpm compile && pnpm lint && pnpm lint:rust && pnpm build && pnpm test && pnpm test:rust",
"build": "turbo build",
"clean": "turbo clean",
"clean:vitest-mjs": "find . -type f -name 'vite.config.ts.timestamp-*-*.mjs' -ls -delete",
"clean:vitest-mjs": "find . -type f -name 'vite*.config.ts.timestamp-*-*.mjs' -ls -delete",
"compile": "turbo compile",
"dev": "turbo dev",
"format": "turbo format",
Expand Down
4 changes: 2 additions & 2 deletions packages/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"license": "(MIT OR Apache-2.0)",
"type": "module",
"scripts": {
"clean": "rm -v wasm/index*",
"clean": "rm -fv wasm/index*",
"clean:rust": "cargo clean --manifest-path ./crate/Cargo.toml",
"compile": "cd crate && wasm-pack build --no-pack --target bundler --out-name index --out-dir ../wasm",
"dev": "cargo watch -C ./crate --postpone -- pnpm turbo run compile",
"format": "cd crate && cargo fmt --all",
"format:rust": "cd crate && cargo fmt --all",
"lint": "eslint \"src/*.ts*\"",
"lint:rust": "cd crate && cargo fmt --all -- --check && cargo clippy -- -D warnings && cargo clippy --tests -- -D warnings",
"test": "vitest run",
Expand Down
11 changes: 7 additions & 4 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,19 @@
},
"dev": {
"cache": false,
"dependsOn": ["build"],
"dependsOn": ["^compile"],
"persistent": true
},
"format": {
"cache": false,
"dependsOn": ["//#format:syncpack", "//#format:prettier", "format:rust"]
"dependsOn": ["format:ts", "format:rust"]
},
"format:rust": {
"dependsOn": ["compile"],
"inputs": ["crate/src/**", "crate/Cargo.toml", "crate/Cargo.lock", "crate/tests/**"]
"cache": false
},
"format:ts": {
"cache": false,
"dependsOn": ["//#format:syncpack", "//#format:prettier"]
},
"host": {
"cache": false,
Expand Down

0 comments on commit 5b21ff1

Please sign in to comment.