create-hono icon indicating copy to clipboard operation
create-hono copied to clipboard

provide command option

Open davidkhala opened this issue 1 year ago • 4 comments

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?

davidkhala avatar Jul 28 '24 14:07 davidkhala

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

ryuapp avatar Jul 28 '24 14:07 ryuapp

Having --force is great enough.

davidkhala avatar Jul 28 '24 23:07 davidkhala

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.

ryuapp avatar Jul 30 '24 02:07 ryuapp

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".

davidkhala avatar Jul 30 '24 04:07 davidkhala