chore: @typegpu/cli#2538
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (353 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
Resolution Time Benchmark---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.85, 1.81, 3.71, 5.24, 6.45, 9.78, 19.14, 20.02]
line [0.87, 1.70, 3.72, 5.61, 6.27, 10.05, 18.45, 19.44]
line [0.85, 1.73, 3.84, 5.82, 6.83, 9.23, 19.65, 22.16]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.28, 0.50, 0.60, 0.78, 1.10, 1.16, 1.32, 1.43]
line [0.28, 0.52, 0.66, 0.78, 1.03, 1.11, 1.35, 1.43]
line [0.31, 0.54, 0.66, 0.84, 1.09, 1.11, 1.31, 1.49]
---
config:
themeVariables:
xyChart:
plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
y-axis "time (ms)"
line [0.74, 1.70, 3.22, 6.12, 10.94, 22.68, 47.91, 99.25]
line [0.71, 1.85, 3.57, 5.57, 10.67, 22.12, 49.88, 100.32]
line [0.83, 1.82, 3.72, 5.56, 11.07, 23.72, 51.07, 103.18]
|
52410c3 to
d0d6ad8
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces a new @typegpu/cli package that provides a tgpu executable for scaffolding a new TypeGPU project (from bundled templates) and for interactively enhancing an existing Vite project by installing/configuring TypeGPU-related dependencies.
Changes:
- Added the TypeGPU CLI implementation (
create+enhanceflows) with supporting utilities (prompts, package manager execution, file/template operations). - Added a
template-vite-simplestarter template (Vite config, TS config, HTML/CSS, assets, lint/format config). - Updated workspace lockfile importers to reflect the new
packages/typegpu-clipackage and adjusted transitive peer dependency snapshot metadata.
Reviewed changes
Copilot reviewed 1 out of 36 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds packages/typegpu-cli importer (and removes prior importer entry), plus snapshot metadata updates. |
| packages/typegpu-cli/tsdown.config.ts | Build configuration for bundling the CLI with tsdown. |
| packages/typegpu-cli/tsconfig.json | TypeScript config for the CLI package. |
| packages/typegpu-cli/package.json | Renames package to @typegpu/cli (bin remains tgpu). |
| packages/typegpu-cli/README.md | Usage docs for running the CLI via package runners. |
| packages/typegpu-cli/LICENSE | Declares licensing terms for template content (CC0). |
| packages/typegpu-cli/src/index.ts | CLI entrypoint + argument parsing and dispatch. |
| packages/typegpu-cli/src/create.ts | Interactive scaffolding flow (select template, copy files, install/run). |
| packages/typegpu-cli/src/enhance.ts | Interactive enhancement flow for existing projects (Vite-focused). |
| packages/typegpu-cli/src/steps/typegpu.ts | Step to install typegpu. |
| packages/typegpu-cli/src/steps/vite.ts | Step to install/configure unplugin-typegpu in Vite config. |
| packages/typegpu-cli/src/steps/webgpu-types.ts | Step to install @webgpu/types and register it in tsconfig. |
| packages/typegpu-cli/src/utils/config.ts | Utility to locate config files by name. |
| packages/typegpu-cli/src/utils/files.ts | Directory preparation + template copying/renaming logic. |
| packages/typegpu-cli/src/utils/inputs.ts | Prompt helpers for project directory and package name input. |
| packages/typegpu-cli/src/utils/pkg.ts | Utility to check if a dependency exists in package.json. |
| packages/typegpu-cli/src/utils/pm.ts | Package-manager detection and command execution helpers. |
| packages/typegpu-cli/src/utils/prompts.ts | Shared prompt helpers (confirm/cancel/fail) and text coloring. |
| packages/typegpu-cli/src/utils/types.ts | ArkType schemas for package.json/tsconfig shapes. |
| packages/typegpu-cli/templates/template-vite-simple/index.html | Template landing page (canvas + “next steps” links). |
| packages/typegpu-cli/templates/template-vite-simple/vite.config.ts | Template Vite config enabling unplugin-typegpu. |
| packages/typegpu-cli/templates/template-vite-simple/tsconfig.json | Template TS config including @webgpu/types and Vite types. |
| packages/typegpu-cli/templates/template-vite-simple/src/main.ts | Template example rendering pipeline and resize handling. |
| packages/typegpu-cli/templates/template-vite-simple/src/style.css | Template styling for the landing page. |
| packages/typegpu-cli/templates/template-vite-simple/oxlint.config.ts | Template oxlint configuration (includes typegpu rules). |
| packages/typegpu-cli/templates/template-vite-simple/public/favicon.svg | Template favicon asset. |
| packages/typegpu-cli/templates/template-vite-simple/public/icons.svg | Template icon sprite sheet. |
| packages/typegpu-cli/templates/template-vite-simple/public/typegpu-logo-dark.svg | Template TypeGPU logo (dark mode). |
| packages/typegpu-cli/templates/template-vite-simple/public/typegpu-logo-light.svg | Template TypeGPU logo (light mode). |
| packages/typegpu-cli/templates/template-vite-simple/public/vite.svg | Template Vite logo asset. |
| packages/typegpu-cli/templates/template-vite-simple/_package.json | Template package.json source (renamed during scaffolding). |
| packages/typegpu-cli/templates/template-vite-simple/_gitignore | Template gitignore source (renamed during scaffolding). |
| packages/typegpu-cli/templates/template-vite-simple/_nvmrc | Template Node version pinning. |
| packages/typegpu-cli/templates/template-vite-simple/_oxfmtrc.json | Template oxfmt configuration. |
| packages/typegpu-cli/templates/template-vite-simple/_vscode/settings.json | Template VS Code workspace settings. |
| packages/typegpu-cli/templates/template-vite-simple/_zed/settings.json | Template Zed workspace settings. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.