Skip to content

Commit 85adca2

Browse files
authored
docs: Freshen' up "tgpu-gen" guide (#820)
1 parent 368d5e3 commit 85adca2

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

apps/typegpu-docs/src/content/docs/tooling/tgpu-gen.mdx

+13-12
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,26 @@ description: A guide on how to use the TypeGPU Generator CLI
66
import { FileTree } from '@astrojs/starlight/components';
77
import FileDiff from '../../../components/FileDiff.astro';
88

9-
TypeGPU Generator (tgpu-gen) is a command-line interface for the TypeGPU code generator.
10-
It provides a way for a highly automated migration process and is a great tool
11-
for existing WebGPU projects that want to start taking advantage of type-safe TypeGPU features.
9+
TypeGPU Generator (tgpu-gen) is a CLI companion tool that transforms WGSL code files into
10+
matching TypeGPU definitions. It can be used for integrating TypeGPU into established WebGPU projects, or automating the migration process.
1211

13-
## Installation
12+
- ✨ Generate TypeGPU definitions from WGSL shaders
13+
- 👀 Continuously watch for changes in WGSL files and update the generated definitions
14+
- 🌲 Specify input and output using glob patterns
15+
- 🎯 Choose the output extension and CJS or ESM format
1416

15-
Using npm:
17+
## Installation
1618

19+
You can use it directly through `npx`:
20+
```bash
21+
npx tgpu-gen path/to/shader.wgsl
22+
```
23+
Or install it globally:
1724
```bash
1825
npm install -g tgpu-gen
26+
tgpu-gen path/to/shader.wgsl
1927
```
2028

21-
## Feature overview
22-
23-
- Generate TypeGPU definitions from WGSL shaders
24-
- Continuously watch for changes in WGSL files and update the generated definitions
25-
- Specify input and output using glob patterns
26-
- Choose the output extension and CommonJS or ES module format
27-
2829
## Example
2930

3031
Let's assume the following directory structure:

0 commit comments

Comments
 (0)