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(sites): Repo shorthand for create:site-template #4382

Merged
merged 17 commits into from
Mar 2, 2022
Merged

feat(sites): Repo shorthand for create:site-template #4382

merged 17 commits into from
Mar 2, 2022

Conversation

iib0011
Copy link
Contributor

@iib0011 iib0011 commented Feb 25, 2022

Summary

Fixes #4326

We can now use:

ntl sites:create-template nextjs-blog-theme
which will expand to github.com/netlify-templates/nextjs-blog-theme

And this:

ntl sites:create-template jlengstorf/my-template
which will expand to github.com/jlengstorf/my-template

@erezrokah erezrokah added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Feb 28, 2022
Copy link
Contributor

@erezrokah erezrokah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @iib0011, very cool 🚀

Can we declare the repo as an "official" optional command argument? See https://github.com/tj/commander.js/tree/02a124c7d58dbae2ef11f9284b2c68ad94f6dc8b#command-arguments

That should add it to the help and docs and allow better access to it in the command action

@iib0011
Copy link
Contributor Author

iib0011 commented Feb 28, 2022 via email

@iib0011 iib0011 requested a review from a team as a code owner February 28, 2022 14:18
@erezrokah
Copy link
Contributor

Ok. Let me change it

Thanks, it seems this PR has some unnecessary changes (e.g. types and line removals). Do you mind reverting them?

@iib0011
Copy link
Contributor Author

iib0011 commented Feb 28, 2022

Okay

erezrokah
erezrokah previously approved these changes Mar 2, 2022
@erezrokah
Copy link
Contributor

@iib0011, I added a few commits, specifically b9632a4 to handle non existing/non template repositories.

Please let me know what you think

@iib0011
Copy link
Contributor Author

iib0011 commented Mar 2, 2022

@erezrokah Yes. It looks good to me.

@erezrokah erezrokah merged commit 4e74045 into netlify:main Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use repo shorthand for choosing a template quickly in sites:create-template
2 participants