Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI enhancement: use folder as project name in package.json instead of "basic" #263

Closed
fthebaud opened this issue Jun 9, 2021 · 4 comments
Labels
cli Affects the CLI app generator easy enhancement New feature or request good first issue Good for newcomers

Comments

@fthebaud
Copy link

fthebaud commented Jun 9, 2021

When creating a new project using the basic template:

> tinyhttp new basic my-app 
Creating a new tinyhttp project from basic template in my-app folder ⚡
Fetching template contents ⌛
Done! You can now launch your project with running these commands:
    
    cd my-app  

    pnpm run start

This generates a package.json with the name "basic":

  "name": "basic",

Wouldn't it be better to use the folder name instead ?

  "name": "my-app",
@fthebaud fthebaud added the enhancement New feature or request label Jun 9, 2021
@talentlessguy talentlessguy added the cli Affects the CLI app generator label Jun 9, 2021
@talentlessguy
Copy link
Member

talentlessguy commented Jun 9, 2021

feel free to PR this enhancement

it's quite easy to simplement

@talentlessguy talentlessguy added easy good first issue Good for newcomers labels Jun 9, 2021
@paolotiu
Copy link
Contributor

paolotiu commented Jun 12, 2021

Hello! I successfully implemented this in my local fork, but I'm having trouble writing the test for it. I uncommented the existing test that creates a package.json, and I could write something that checks the name of the created package.json, but I'm afraid that it's commented for a reason.

@talentlessguy
Copy link
Member

closed via #264

@talentlessguy
Copy link
Member

talentlessguy commented Jun 12, 2021

released in 1.3.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Affects the CLI app generator easy enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants