Skip to content

Commit

Permalink
add steps about show-errors.js
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jun 28, 2024
1 parent 147e85c commit 0fd50a0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

/docs
/dist
/show-errors

# -- clip-for-deploy-end --

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ examples and inject the helper. Ideally there should be no errors.
You can skip the first N tests with `-- --skip-count=<number>` (the first `--` is required).
### show-errors.js
You can generate show-errors.js with `npm run build-show-errors`.
show-errors.js wraps calls to `pushErrorScope` and `popErrorScope` around every
method of `GPUDevice` and `GPUQueue`. It is used in the
[webgpu-dev-extension](https://github.com/greggman/webgpu-dev-extension).
## License
[MIT](LICENSE.md)
Expand Down
20 changes: 20 additions & 0 deletions tsconfig-show-errors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "AMD",
"outFile": "show-errors/show-errors.js",
"allowJs": true,
"declaration": false,
"typeRoots": [
"./node_modules/@webgpu/types",
"./node_modules/@types",
],
},

"include": [
"src/error-scope-wrapper.ts",
],
"typeAcquisition": {
"include": ["@webgpu/types"]
}
}

0 comments on commit 0fd50a0

Please sign in to comment.