honojs / create-hono

CLI for creating a Hono app
56 stars 16 forks source link

provide command option #61

Open davidkhala opened 3 months ago

davidkhala commented 3 months ago

I use following line to create a project in current directory.

npm create hono@latest . -- --template nodejs --install --pm npm 

As you might feel, I want to minimize my manual input along the wizard. But I found I cannot skip the decision of confirm to continue in this not-empty folder

create-hono version 0.10.1
✔ Using target directory … .
? Directory not empty. Continue? yes
✔ Cloning the template
✔ Installing project dependencies
🎉 Copied project files
Get started with: cd .

Did I miss something?

ryuapp commented 3 months ago

That option isn't there. Many create commands don't support it, but it might be nice to have one. --force or --force-clone?

davidkhala commented 3 months ago

Having --force is great enough.

ryuapp commented 3 months ago

There is a concern. This may be dangerous. If a malicious person spreads this script with the --force flag, the contents of the user's drive may be erased.

davidkhala commented 3 months ago

There is a concern. This may be dangerous. If a malicious person spreads this script with the --force flag, the contents of the user's drive may be erased.

This is the script user's responsibility, but not an excuse of "Not invent here".