Skip to content

Commit 3dfa3c2

Browse files
committed
docs: switch @org placeholder from @acme to @your-org
@acme is itself a live npm scope, so it still reads as a real handle a reader might try to use. @your-org is self-describing: it literally tells readers "replace this with your own scope". Same pattern GitHub, npm, and AWS docs use for org placeholders. Also cleans up two descriptions that read awkwardly after the rename — "Full Acme Corp monorepo scaffold" → "Monorepo scaffold" — since personifying the placeholder as a company name is unhelpful when the whole point is that it's not a company. Touched: the RFC, docs/guide/create.md, docs/config/create.md, packages/cli/src/create/{bin.ts, define-config.ts}, all four org snap-tests, and the three org unit test specs. Four snap outputs regenerated; 263 unit tests still pass.
1 parent e1fa199 commit 3dfa3c2

26 files changed

Lines changed: 186 additions & 158 deletions

File tree

docs/config/create.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import { defineConfig } from 'vite-plus';
1111

1212
export default defineConfig({
1313
create: {
14-
defaultTemplate: '@acme',
14+
defaultTemplate: '@your-org',
1515
},
1616
});
1717
```
1818

19-
Any value accepted by `vp create` as a first argument works here — `@acme` for an org picker, `@acme/web` for a direct manifest entry, `vite:application` for a built-in, etc.
19+
Any value accepted by `vp create` as a first argument works here — `@your-org` for an org picker, `@your-org/web` for a direct manifest entry, `vite:application` for a built-in, etc.
2020

2121
## Precedence
2222

docs/guide/create.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Vite+ ships with these built-in templates:
3535

3636
- Use shorthand templates like `vite`, `@tanstack/start`, `svelte`, `next-app`, `nuxt`, `react-router`, and `vue`
3737
- Use full package names like `create-vite` or `create-next-app`
38-
- Use local templates such as `./tools/create-ui-component` or `@acme/generator-*`
38+
- Use local templates such as `./tools/create-ui-component` or `@your-org/generator-*`
3939
- Use remote templates such as `github:user/repo` or `https://github.com/user/template-repo`
4040

4141
Run `vp create --list` to see the built-in templates and the common shorthand templates Vite+ recognizes.
@@ -94,11 +94,11 @@ An organization can publish a curated set of templates under a single npm scope
9494
### Pick from an org
9595

9696
```bash
97-
# Open an interactive picker over @acme/create's manifest
98-
vp create @acme
97+
# Open an interactive picker over @your-org/create's manifest
98+
vp create @your-org
9999

100100
# Run a specific manifest entry directly
101-
vp create @acme/web
101+
vp create @your-org/web
102102

103103
# Set the org as the default for a repo (see create.defaultTemplate config)
104104
vp create
@@ -113,7 +113,7 @@ There are two common layouts. Pick the one that matches the org's template count
113113
**Bundled (recommended for most orgs).** All templates live as subdirectories of `@org/create` itself. Manifest entries use relative `./path` values. One repo, one publish, one versioning story — the same pattern used by `create-vite` and `create-next-app`.
114114

115115
```
116-
@acme/create/
116+
@your-org/create/
117117
├── package.json # "vp": { "templates": [{ "template": "./templates/web" }, ...] }
118118
├── templates/
119119
│ ├── web/
@@ -126,8 +126,8 @@ There are two common layouts. Pick the one that matches the org's template count
126126
**Manifest-only.** When the org already publishes independent `@org/template-*` packages (or hosts them on GitHub), `@org/create` stays a thin index.
127127

128128
```
129-
@acme/create/
130-
├── package.json # "vp": { "templates": [{ "template": "@acme/template-web" }, ...] }
129+
@your-org/create/
130+
├── package.json # "vp": { "templates": [{ "template": "@your-org/template-web" }, ...] }
131131
└── README.md
132132
```
133133

@@ -141,20 +141,20 @@ The manifest lives at `vp.templates` in `@org/create`'s `package.json`:
141141

142142
```json
143143
{
144-
"name": "@acme/create",
144+
"name": "@your-org/create",
145145
"version": "1.0.0",
146146
"vp": {
147147
"templates": [
148148
{
149149
"name": "monorepo",
150-
"description": "Full Acme Corp monorepo",
151-
"template": "@acme/template-monorepo",
150+
"description": "Monorepo",
151+
"template": "@your-org/template-monorepo",
152152
"monorepo": true
153153
},
154154
{
155155
"name": "web",
156156
"description": "Web app template (Vite + React)",
157-
"template": "@acme/template-web",
157+
"template": "@your-org/template-web",
158158
"keywords": ["web", "react", "app"]
159159
},
160160
{
@@ -177,7 +177,7 @@ Each entry supports:
177177
| `keywords` | no | Filter terms for picker search. |
178178
| `monorepo` | no | If `true`, marks this entry as a monorepo-creating template. Hidden from the picker when `vp create` runs inside an existing monorepo, mirroring the built-in `vite:monorepo` filter. |
179179

180-
An invalid manifest is a hard error, not a silent fall-through — a maintainer who shipped a manifest should hear about the offending field, e.g. `@acme/create: vp.templates[2].template must be a non-empty string`.
180+
An invalid manifest is a hard error, not a silent fall-through — a maintainer who shipped a manifest should hear about the offending field, e.g. `@your-org/create: vp.templates[2].template must be a non-empty string`.
181181

182182
### Bundled subdirectory templates
183183

@@ -191,11 +191,11 @@ Commit this in `vite.config.ts` at the project root:
191191
import { defineConfig } from 'vite-plus';
192192

193193
export default defineConfig({
194-
create: { defaultTemplate: '@acme' },
194+
create: { defaultTemplate: '@your-org' },
195195
});
196196
```
197197

198-
Now `vp create` (with no argument) drops straight into the `@acme` picker. See [`create.defaultTemplate`](/config/create) for details.
198+
Now `vp create` (with no argument) drops straight into the `@your-org` picker. See [`create.defaultTemplate`](/config/create) for details.
199199

200200
The picker always appends a trailing **Vite+ built-in templates** entry so `vite:monorepo` / `vite:application` / `vite:library` / `vite:generator` stay reachable from the picker — selecting it routes to the standard built-in flow. For scripts and CI, explicit specifiers (`vp create vite:library`) bypass the configured default.
201201

@@ -204,16 +204,16 @@ The picker always appends a trailing **Vite+ built-in templates** entry so `vite
204204
`vp create @org --no-interactive` prints a stable, fixed-column table of the manifest (name, description, resolved template specifier) and exits 1. The output is machine-parseable, so scripts and AI agents can recover the list without a separate `--list` flag:
205205

206206
```
207-
error: vp create @acme requires a template selection in non-interactive mode.
207+
error: vp create @your-org requires a template selection in non-interactive mode.
208208
209-
available templates from @acme/create:
209+
available templates from @your-org/create:
210210
211211
NAME DESCRIPTION TEMPLATE
212-
web Web app template (Vite + React) @acme/template-web
213-
library TypeScript library template @acme/template-library
212+
web Web app template (Vite + React) @your-org/template-web
213+
library TypeScript library template @your-org/template-library
214214
demo Bundled demo template ./templates/demo
215215
216-
hint: rerun with an explicit selection, e.g. `vp create @acme/web`,
216+
hint: rerun with an explicit selection, e.g. `vp create @your-org/web`,
217217
or use a Vite+ built-in template like `vp create vite:application`.
218218
```
219219

packages/cli/snap-tests-global/command-create-help/snap.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Arguments:
99
- Remote: vite, @tanstack/start, create-next-app,
1010
create-nuxt, github:user/repo, https://github.com/user/template-repo, etc.
1111
- Local: @company/generator-*, ./tools/create-ui-component
12+
- Org scope: @your-org → picker from @your-org/create's vp.templates manifest
13+
- Org entry: @your-org/web → manifest entry "web" (falls back to @your-org/create-web)
14+
When omitted, uses `create.defaultTemplate` from vite.config.ts if set.
1215

1316
Options:
1417
--directory DIR Target directory for the generated project.
@@ -49,6 +52,10 @@ Examples:
4952
vp create github:user/repo
5053
vp create https://github.com/user/template-repo
5154

55+
# Pick from an org that publishes @scope/create with vp.templates
56+
vp create @your-org # interactive picker
57+
vp create @your-org/web # direct selection
58+
5259
Documentation: https://viteplus.dev/guide/create
5360

5461

@@ -63,6 +70,9 @@ Arguments:
6370
- Remote: vite, @tanstack/start, create-next-app,
6471
create-nuxt, github:user/repo, https://github.com/user/template-repo, etc.
6572
- Local: @company/generator-*, ./tools/create-ui-component
73+
- Org scope: @your-org → picker from @your-org/create's vp.templates manifest
74+
- Org entry: @your-org/web → manifest entry "web" (falls back to @your-org/create-web)
75+
When omitted, uses `create.defaultTemplate` from vite.config.ts if set.
6676

6777
Options:
6878
--directory DIR Target directory for the generated project.
@@ -103,6 +113,10 @@ Examples:
103113
vp create github:user/repo
104114
vp create https://github.com/user/template-repo
105115

116+
# Pick from an org that publishes @scope/create with vp.templates
117+
vp create @your-org # interactive picker
118+
vp create @your-org/web # direct selection
119+
106120
Documentation: https://viteplus.dev/guide/create
107121

108122

@@ -117,6 +131,9 @@ Arguments:
117131
- Remote: vite, @tanstack/start, create-next-app,
118132
create-nuxt, github:user/repo, https://github.com/user/template-repo, etc.
119133
- Local: @company/generator-*, ./tools/create-ui-component
134+
- Org scope: @your-org → picker from @your-org/create's vp.templates manifest
135+
- Org entry: @your-org/web → manifest entry "web" (falls back to @your-org/create-web)
136+
When omitted, uses `create.defaultTemplate` from vite.config.ts if set.
120137

121138
Options:
122139
--directory DIR Target directory for the generated project.
@@ -157,5 +174,9 @@ Examples:
157174
vp create github:user/repo
158175
vp create https://github.com/user/template-repo
159176

177+
# Pick from an org that publishes @scope/create with vp.templates
178+
vp create @your-org # interactive picker
179+
vp create @your-org/web # direct selection
180+
160181
Documentation: https://viteplus.dev/guide/create
161182

packages/cli/snap-tests-global/new-check/snap.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Arguments:
99
- Remote: vite, @tanstack/start, create-next-app,
1010
create-nuxt, github:user/repo, https://github.com/user/template-repo, etc.
1111
- Local: @company/generator-*, ./tools/create-ui-component
12+
- Org scope: @your-org → picker from @your-org/create's vp.templates manifest
13+
- Org entry: @your-org/web → manifest entry "web" (falls back to @your-org/create-web)
14+
When omitted, uses `create.defaultTemplate` from vite.config.ts if set.
1215

1316
Options:
1417
--directory DIR Target directory for the generated project.
@@ -49,6 +52,10 @@ Examples:
4952
vp create github:user/repo
5053
vp create https://github.com/user/template-repo
5154

55+
# Pick from an org that publishes @scope/create with vp.templates
56+
vp create @your-org # interactive picker
57+
vp create @your-org/web # direct selection
58+
5259
Documentation: https://viteplus.dev/guide/create
5360

5461

packages/cli/snap-tests/create-org-bundled/mock-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"@acme/create": {
3-
"name": "@acme/create",
2+
"@your-org/create": {
3+
"name": "@your-org/create",
44
"dist-tags": { "latest": "1.0.0" },
55
"versions": {
66
"1.0.0": {
77
"version": "1.0.0",
88
"dist": {
9-
"tarball": "{REGISTRY}/@acme/create/-/create-1.0.0.tgz",
9+
"tarball": "{REGISTRY}/@your-org/create/-/create-1.0.0.tgz",
1010
"integrity": "sha512-h4Q9x+aUa2RUJGBe7JCZnWpGMyd8VHXPfL9+EBxrA2EWRV8rlmMCP45B3woZ8xA2fmkE/jUy1W7OM2GCjoPWQA=="
1111
},
1212
"vp": {

packages/cli/snap-tests/create-org-bundled/mock-server.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Minimal mock npm registry used by `create-org-*` snap-tests.
22
//
3-
// Reads `./mock-manifest.json` (keyed by URL path, e.g. `"@acme/create"`) and
3+
// Reads `./mock-manifest.json` (keyed by URL path, e.g. `"@your-org/create"`) and
44
// optionally serves `.tgz` tarballs from `./tarballs/<name>`. Picks an
55
// ephemeral port, sets `NPM_CONFIG_REGISTRY` on the child environment, spawns
66
// the wrapped command, and tears down when the child exits.

packages/cli/snap-tests/create-org-bundled/snap.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
> node mock-server.mjs -- vp create @acme/demo --no-interactive --directory my-demo-app # bundled template: extract tarball, copy subdir
1+
> node mock-server.mjs -- vp create @your-org/demo --no-interactive --directory my-demo-app # bundled template: extract tarball, copy subdir
22

3-
selected 'demo' from @acme/create
3+
selected 'demo' from @your-org/create
44
◇ Scaffolded my-demo-app
55
• Node <semver> pnpm <semver>
66
→ Next: cd my-demo-app && vp run

packages/cli/snap-tests/create-org-bundled/steps.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"commands": [
3-
"node mock-server.mjs -- vp create @acme/demo --no-interactive --directory my-demo-app # bundled template: extract tarball, copy subdir",
3+
"node mock-server.mjs -- vp create @your-org/demo --no-interactive --directory my-demo-app # bundled template: extract tarball, copy subdir",
44
"cat my-demo-app/package.json # verify package.json name was rewritten",
55
"cat my-demo-app/src/index.ts # verify bundled source copied",
66
"ls my-demo-app/README.md # verify README copied"

packages/cli/snap-tests/create-org-invalid-manifest/mock-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"@acme/create": {
3-
"name": "@acme/create",
2+
"@your-org/create": {
3+
"name": "@your-org/create",
44
"dist-tags": { "latest": "1.0.0" },
55
"versions": {
66
"1.0.0": {
77
"version": "1.0.0",
88
"dist": {
9-
"tarball": "{REGISTRY}/@acme/create/-/create-1.0.0.tgz",
9+
"tarball": "{REGISTRY}/@your-org/create/-/create-1.0.0.tgz",
1010
"integrity": "sha512-fake"
1111
},
1212
"vp": {

packages/cli/snap-tests/create-org-invalid-manifest/mock-server.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Minimal mock npm registry used by `create-org-*` snap-tests.
22
//
3-
// Reads `./mock-manifest.json` (keyed by URL path, e.g. `"@acme/create"`) and
3+
// Reads `./mock-manifest.json` (keyed by URL path, e.g. `"@your-org/create"`) and
44
// optionally serves `.tgz` tarballs from `./tarballs/<name>`. Picks an
55
// ephemeral port, sets `NPM_CONFIG_REGISTRY` on the child environment, spawns
66
// the wrapped command, and tears down when the child exits.

0 commit comments

Comments
 (0)