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

Add shorthand for Starlight templates to create astro #7993

Merged
merged 3 commits into from
Aug 8, 2023

Conversation

delucis
Copy link
Member

@delucis delucis commented Aug 8, 2023

Changes

This adds some more special case handling for Starlight starter templates

Currently we hardcode --template starlight to withastro/starlight/examples/basics.

But withastro/starlight#337 adds a new starter, and it would be nice to shorten the command needed to use it.

# current syntax
npm create astro@latest -- --template withastro/starlight/examples/tailwind

# with the changes in this PR
npm create astro@latest -- --template starlight/tailwind

If we think this is too much special-casing, we can close this.

Testing

Tested the logic works manually, but not sure if it’s possible to run the local create-astro?

Docs

Will only impact Starlight’s docs, which I’ll update if we merge this.

@changeset-bot
Copy link

changeset-bot bot commented Aug 8, 2023

🦋 Changeset detected

Latest commit: dd472f2

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: create-astro Related to the `create-astro` package (scope) label Aug 8, 2023
@natemoo-re natemoo-re merged commit 315d58f into main Aug 8, 2023
@natemoo-re natemoo-re deleted the chris/create-starlight branch August 8, 2023 17:08
@astrobot-houston astrobot-houston mentioned this pull request Aug 8, 2023
@delucis
Copy link
Member Author

delucis commented Aug 8, 2023

Ah yeah, I did consider this but this version does potentially discard stuff if there are two slashes. Don't see when we'd need that though to be fair — thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: create-astro Related to the `create-astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants