This package is the Vite+ organization template picker package.
This copy is configured for the @thunderstrikeco npm scope, so users will run:
vp create @thunderstrikecoVite+ maps that command to this package:
@thunderstrikeco/create
Vite+ then reads createConfig.templates from this package's package.json.
First run:
pnpm start:registryThen, in a separate terminal:
pnpm registry:add-user
# Username: test
# Password: test
# Email: test@test.coThen create a .npmrc file in the root of this package with the following content:
@thunderstrikeco:registry=http://localhost:4873/Then, in a separate terminal, run:
pnpm publish:localFrom here you can now verify the templates are working by running:
pnpm verify:tanstack-start-solidOpen package.json and update:
- each external
@thunderstrikeco/...template package to point to the real template packages you publish - each
name,description, andtemplateentry undercreateConfig.templates
The name field is what users type after the colon:
vp create @thunderstrikeco:web-reactThat selects the manifest entry whose name is web-react.
Do this:
{
"name": "web-react",
"description": "React web app template",
"template": "@thunderstrikeco/template-web-react"
}and add one entry per selectable template.
Avoid assuming Vite+ will discover nested templates inside one package like @thunderstrikeco/templates-web. The organization picker reads the entries listed directly in @thunderstrikeco/create's createConfig.templates manifest.
The demo and monorepo entries point at folders inside this package:
{
"name": "demo",
"description": "Bundled demo template included in this package",
"template": "./templates/demo"
}Relative paths such as ./templates/demo are resolved relative to the root of this package, not relative to the user's current directory.
Entries like this point to separate npm packages:
{
"name": "web-react",
"description": "React web app template",
"template": "@thunderstrikeco/template-web-react"
}Here, this package contains the picker, while @thunderstrikeco/template-web-react contains the actual template files.
If your packages live in a private npm registry, configure npm with a project or user .npmrc file. For example:
@thunderstrikeco:registry=https://registry.example.com
//registry.example.com/:_authToken=${NPM_TOKEN}Before publishing, from this package folder:
npm pack --dry-runAfter publishing:
vp create @thunderstrikeco --no-interactive
vp create @thunderstrikeco:web-react --no-interactive
vp create @thunderstrikecoThe first command should print the available template table. The second should scaffold a specific template without prompts. The third should open the interactive picker.
To make vp create open your organization picker by default in a repo, copy examples/vite.config.ts into that repo. It is already configured with @thunderstrikeco.