Description
When scaffolding a new project with vp create, there is no built-in way to
initialize a git repository.
Users need to manually run git init and
git add -A && git commit -m "Initial commit" after scaffolding, which is
a common step in every new project setup.
Adding a flag (e.g. --git) would streamline the project creation flow and bring
vp create in line with other popular scaffolding tools (e.g. create-next-app,
nuxt init) that offer git initialization out of the box.
Suggested solution
Add a --git / --no-git flag to vp create.
- In interactive mode, prompt the user with a confirm dialog (default: No)
- In non-interactive mode, default to skipping git initialization
- When enabled, run
git init before installing dependencies,
then git add -A && git commit -m "Initial commit from Vite+" after formatting completes
API:
vp create vite:application --git # always initialize
vp create vite:application --no-git # always skip
Alternative
No response
Additional context
No response
Validations
Description
When scaffolding a new project with
vp create, there is no built-in way toinitialize a git repository.
Users need to manually run
git initandgit add -A && git commit -m "Initial commit"after scaffolding, which isa common step in every new project setup.
Adding a flag (e.g.
--git) would streamline the project creation flow and bringvp createin line with other popular scaffolding tools (e.g.create-next-app,nuxt init) that offer git initialization out of the box.Suggested solution
Add a
--git/--no-gitflag tovp create.git initbefore installing dependencies,then
git add -A && git commit -m "Initial commit from Vite+"after formatting completesAPI:
vp create vite:application --git # always initialize
vp create vite:application --no-git # always skip
Alternative
No response
Additional context
No response
Validations