Repository navigation
feat: add create-vite-plus package
#3028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
40b8370
feat(create): use the package manager that launched vp create
liangmiQwQ 52cb056
feat: add create-vite-plus package
liangmiQwQ 9e76960
docs: document create-vite-plus
liangmiQwQ 3989ddd
Merge branch 'main' into feat/create-vite-plus
liangmiQwQ dc7c7fe
wip
liangmiQwQ b4eb245
docs
liangmiQwQ 746218c
Merge branch 'main' into feat/create-vite-plus
liangmiQwQ caf0b75
ci(preview): pack create-vite-plus for preview builds
liangmiQwQ eb1b283
Merge branch 'main' into feat/create-vite-plus
liangmiQwQ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...d_application/snapshots/create_next_command_application_from_package_manager.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # create_next_command_application_from_package_manager | ||
|
|
||
| `npm create vite-plus` stamps npm's user agent: create with npm and run vp through it, since the global CLI may be missing. | ||
|
|
||
| ## `vp create vite:application --no-interactive` | ||
|
|
||
| verify npm is selected and the next command uses npx | ||
|
|
||
| ``` | ||
| ● Using default package name: vite-plus-application | ||
| ◇ Scaffolded vite-plus-application with Vite application | ||
| • Node <version> npm <version> | ||
| → Next: cd vite-plus-application && npx vp run | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026-present, VoidZero Inc. | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # create-vite-plus | ||
|
|
||
| Create a new [Vite+](https://viteplus.dev) project without installing the global `vp` CLI. | ||
|
|
||
| ```bash | ||
| pnpm create vite-plus | ||
| npm create vite-plus@latest | ||
| yarn create vite-plus | ||
| bun create vite-plus | ||
| ``` | ||
|
|
||
| This runs [`vp create`](https://viteplus.dev/guide/create) from the `vite-plus` package and uses the package manager that ran it, unless you pass `--package-manager` or create the project inside an existing workspace. Arguments are forwarded unchanged, so the first argument is the template: | ||
|
|
||
| ```bash | ||
| pnpm create vite-plus vite:application --directory my-app | ||
| pnpm create vite-plus vite -- --template react-ts | ||
| ``` | ||
|
|
||
| npm needs `--` before options meant for `vp create`, for example `npm create vite-plus@latest -- vite:library --no-interactive`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| import module from 'node:module'; | ||
| if (module.enableCompileCache) { | ||
| module.enableCompileCache(); | ||
| } | ||
| // `pnpm create vite-plus <args>` runs this bin with `<args>`; the CLI entry | ||
| // dispatches on the first argument, so this becomes `vp create <args>`. | ||
| process.argv.splice(2, 0, 'create'); | ||
| // Dynamic import so it runs AFTER enableCompileCache and the argv rewrite. | ||
| await import('vite-plus/bin'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| { | ||
| "name": "create-vite-plus", | ||
| "version": "1.1.0", | ||
| "description": "Create a new Vite+ project", | ||
| "keywords": [ | ||
| "vite-plus" | ||
| ], | ||
| "homepage": "https://viteplus.dev/guide/create", | ||
| "bugs": { | ||
| "url": "https://github.com/voidzero-dev/vite-plus/issues" | ||
| }, | ||
| "license": "MIT", | ||
| "author": "VoidZero Inc.", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/voidzero-dev/vite-plus.git", | ||
| "directory": "packages/create-vite-plus" | ||
| }, | ||
| "bin": { | ||
| "create-vite-plus": "./bin/create-vite-plus" | ||
| }, | ||
| "files": [ | ||
| "bin" | ||
| ], | ||
| "type": "module", | ||
| "dependencies": { | ||
| "vite-plus": "workspace:*" | ||
| }, | ||
| "engines": { | ||
| "node": "^22.18.0 || ^24.11.0 || >=26.0.0" | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.