Skip to content

Commit

Permalink
[js/web] optimize tsc for web: split out "npm prepare" (#17955)
Browse files Browse the repository at this point in the history
### Description
optimize tsc for web: split out "npm prepare"
  • Loading branch information
fs-eire authored and jchen351 committed Oct 18, 2023
1 parent a87b5be commit f3ecbf1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion js/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"node/lib/**/*.js.map": true,
"node/lib/**/*.js": true,
"web/lib/**/*.js.map": true,
"web/lib/**/*.js": true
"web/lib/**/*.js": true,
"web/lib/**/*.d.ts": true
},
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
Expand Down
2 changes: 1 addition & 1 deletion js/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"scripts": {
"preprepare": "node -e \"require('node:fs').copyFileSync('./node_modules/long/index.d.ts', './node_modules/long/umd/index.d.ts')\"",
"prepare": "tsc",
"prepare": "tsc --build ./script",
"build:doc": "node ./script/generate-webgl-operator-md && node ./script/generate-webgpu-operator-md",
"pull:wasm": "node ./script/pull-prebuilt-wasm-artifacts",
"test:e2e": "node ./test/e2e/run",
Expand Down
6 changes: 6 additions & 0 deletions js/web/script/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../../tsconfig.tools.json",
"compilerOptions": {
"sourceMap": true
}
}
3 changes: 1 addition & 2 deletions js/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
"module": "Node16",
"downlevelIteration": true,
"declaration": true,
"declarationDir": "./types",
"typeRoots": ["./node_modules/@webgpu/types", "./node_modules/@types", "../node_modules/@types"]
},
"include": ["lib", "script", "test"],
"include": ["lib", "test"],
"exclude": ["lib/wasm/proxy-worker"]
}

0 comments on commit f3ecbf1

Please sign in to comment.