-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: Add --install and --pm flags which skip interactive questions w… #34
Conversation
Hi @jculvey ! Awesome! These will bring good DX for users. One thing, can you update the README to add a description of these options? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jculvey I've left two comments. Can you check them?
Install dependencies after cloning template. | ||
|
||
``` | ||
npm create hono@latest ./my-app -- --install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think --
is not necessary. We can write it shorter.
npm create hono@latest ./my-app --install
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, it is necessary 😓 . A weird quirk of npm create
is that it requires --
to be specified before any additional flags that are intended to be passed to an underlying cli. This can be demonstrated with the existing --template
flag:
compared to:
It's worth noting that npm
is the only package manager with this weird quirk however. See pnpm:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jculvey Thank you very very much for explaining the details. I could understand well. --
should be needed!
Allows you to specify which package manager to use. | ||
|
||
``` | ||
npm create hono@latest ./my-app -- --pm pnpm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as above, --
is not necessary.
Hi @jculvey ! Looks good. Let's ship it. Thanks! |
feat: Add --install and --pm flags which skip interactive questions when specified.
Allows you to:
pnpm create hono@latest --install --pm pnpm
and skip the questions. This simplifies the DX when running in automated contexts.