-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
Description
When using . as the project path, it would be convenient if the tool used the current directory name as the package name instead of the template's default name.
Currently:
npm create rstack@latest . # → package.json name: "rsbuild-react18-ts" (template default)This happens because of https://github.com/rspack-contrib/create-rstack/blob/main/src/index.ts#L486-L488, which skips updating the name when it's .
Similar Tools
While not all tools follow this pattern, some other scaffolding tools support this:
Vite:
cd my-project
npm create vite@latest . # → package.json name: "my-project"Next.js:
cd my-project
npx create-next-app@latest . # → package.json name: "my-project"I'd be happy to submit a PR if this would be a useful addition
chenjiahan