Skip to content

Request to use current directory name when project path is . #74

@fronterior

Description

@fronterior

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions