Skip to content

Conversation

@fronterior
Copy link
Contributor

When creating a project with ., use the directory name as the package name instead of keeping the template default. Fixes #74.
Checked for macOS and Windows local paths.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for using . as the project name to create a project in the current directory, with the package name automatically derived from the current directory name. This addresses issue #74 and has been tested on both macOS and Windows.

Key changes:

  • Modified updatePackageJson to detect when name is . and extract the directory name from the package.json path
  • Uses path.basename(path.dirname(pkgJsonPath)) to derive the current directory name as the package name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@chenjiahan chenjiahan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@chenjiahan chenjiahan merged commit 92d4707 into rspack-contrib:main Nov 11, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request to use current directory name when project path is .

2 participants