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

Accept template name as positional argument from command line #1

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

jculvey
Copy link
Contributor

@jculvey jculvey commented Apr 6, 2023

This change allows the user to pass their desired template from the command line like so: npm create hono ./my-hono-app cloudflare-pages. This is useful for automation where you'd like to skip any interactive prompts.

@yusukebe
Copy link
Member

yusukebe commented Apr 6, 2023

Hi @jculvey !

Thank you for creating the PR.

I see, there is a use case for passing which template name we want to use on the command line. And your implementation is good.

But I don't think it's intuitive to take the template name as the second argument. How about using --template?

npm create hono ./my-hono-app --template cloudflare-pages

@jculvey
Copy link
Contributor Author

jculvey commented Apr 6, 2023

Hi @yusukebe !

Thanks a bunch for the quick response!

Your proposal works fine for me. I've updated my changes to take a --template flag instead.

@yusukebe
Copy link
Member

yusukebe commented Apr 6, 2023

@jculvey

Great! I'll merge it. Thanks!

@yusukebe yusukebe merged commit 0b224b8 into honojs:main Apr 6, 2023
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