You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a Developer create apps with create-vite, I want to specify a file path in the first parameter and then have the project name automatically set from the last part of that path, i.e. the path.basename() of that path. So for a command like this:
npm create vite ../../myfolder/myapp -- --template react
The project name should be set to "myapp", with no further prompting of the user.
At present, if create-vite detects a path in the first parameter then it will prompt for the project name, offering a default of something like "-myapp".
Suggested solution
Should be able to implement in file packages/create-vite/src/index.ts, by changing the getProjectName function from this:
Description
As a Developer create apps with create-vite, I want to specify a file path in the first parameter and then have the project name automatically set from the last part of that path, i.e. the
path.basename()
of that path. So for a command like this:The project name should be set to "myapp", with no further prompting of the user.
At present, if
create-vite
detects a path in the first parameter then it will prompt for the project name, offering a default of something like "-myapp".Suggested solution
Should be able to implement in file packages/create-vite/src/index.ts, by changing the
getProjectName
function from this:to this:
Alternative
No response
Additional context
This is how
create-react-app
behaves, so would help smooth the path tocreate-vite
forcreate-react-app
refugees (like me!).Validations
The text was updated successfully, but these errors were encountered: