Set project name automatically when target includes a path #16470
Labels
feat: create-vite
create-vite package
p2-nice-to-have
Not breaking anything but nice to have (priority)
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: