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

feat: Add --install and --pm flags which skip interactive questions w… #34

Merged
merged 2 commits into from
Apr 21, 2024

Conversation

jculvey
Copy link
Contributor

@jculvey jculvey commented Apr 19, 2024

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.

@yusukebe
Copy link
Member

Hi @jculvey !

Awesome! These will bring good DX for users. One thing, can you update the README to add a description of these options?

Copy link
Member

@yusukebe yusukebe left a 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
Copy link
Member

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

Copy link
Contributor Author

@jculvey jculvey Apr 20, 2024

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:

image

compared to:

image

It's worth noting that npm is the only package manager with this weird quirk however. See pnpm:

image

Copy link
Member

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
Copy link
Member

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.

@yusukebe
Copy link
Member

Hi @jculvey !

Looks good. Let's ship it. Thanks!

@yusukebe yusukebe merged commit 4c7e586 into honojs:main Apr 21, 2024
2 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.

2 participants