Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

feat(cli)!: use giget 0.1x with template registry for nuxi init #7404

Merged
merged 5 commits into from
Sep 10, 2022

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Sep 10, 2022

πŸ”— Linked issue

#7361

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR upgrades to unjs/giget 0.1.x with custom template registry support. This way we can have beautiful aliases for template names without rebuilding and releasing nuxi CLI but directly from nuxt/starter. A custom environment variable NUXI_INIT_REGISTRY can be used to use an alternative registry.

Breaking change: Usage of -t repo/name is changed to -t gh:repo/name for 3rd party templates.

DX change: Using more minimal output now:

image

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Sep 10, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit ec66e75
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/631c92104a18550009f954fd

@pi0 pi0 changed the title feat(cli)!: use giget 0.1x with template registry feat(cli)!: use giget 0.1x with template registry for nuxi init Sep 10, 2022
@pi0
Copy link
Member Author

pi0 commented Sep 10, 2022

(merging to try on edge and also unblock #7383)

@pi0 pi0 merged commit 270055b into main Sep 10, 2022
@pi0 pi0 deleted the feat/giget-1x branch September 10, 2022 13:37
@danielroe
Copy link
Member

danielroe commented Sep 11, 2022

@pi0 Could we avoid a breaking change? Often npx nuxi does not run the latest version of nuxi owing to npm caching so we will likely need to update documentation to npx nuxi@latest if we are providing a template option, which seems a bit verbose...

Edit - oh, I see - only breaking for non-nuxt starter templates. πŸ‘

@pi0
Copy link
Member Author

pi0 commented Sep 12, 2022

Indeed actually we could also not break the org/name usage and allow without gh: prefix but i thought it would be too implicit and making it fragile for future development with registry (example: supporting registry templates with slash in their name like. we don't know it is registry id or gh id)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants