Extract the Qwik CLI into @qwik.dev/cli and introduce qwik upgrade #350
Replies: 2 comments 1 reply
-
|
This is an excellent idea 👌 I had actually thought about this before and drew a lot of inspiration from the Qwik CLI. It’s similar to what Astro does with their CLI kit, where a separate kit is used in From what I understand, your proposal is to have a single CLI that lets users create a Qwik project with Qwik City, Astro, or other options. I’d suggest keeping We could also provide a shared CLI kit like Astro’s to avoid duplicating code across org repos. This keeps the Astro creation command intact while giving full visibility in the main Qwik CLI. Another idea: a separate repo for starter kits could be useful. |
Beta Was this translation helpful? Give feedback.
-
|
Generally I don't like moving tightly coupled packages in their own repos, but for the CLI it's useful because the CLI should not be coupled to the qwik versions. So I'm all for it. We'd still have the e2e-cli tests in the qwik repo but that's just for making sure that the CLI can install it, not the CLI itself. Also, we should move the starters into a separate package. In latest v2 they are completely separate from the e2e tests now so it should be easy, and it would make the core package at least 1MB lighter. They would have to be versioned separately though for it to be useful. Another option is to not package the starters at all, and instead rely on fetching them from e.g. github, but that would mean no offline use, or creating and updating a local cache. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is it about?
Move the Qwik CLI into a dedicated package, ideally its own repo, and unify upgrade tooling across the Qwik ecosystem.
What's the motivation for this proposal?
Problems you are trying to solve:
@qwik.dev/corecurrently owns CLI code that is developer tooling, not runtime functionality.@siguicifor the past 2 years, and it would be great to merge efforts instead of duplicating them.Goals you are trying to achieve:
migrate-v2to the more durable commandqwik upgradefor long term usage.@qwik.dev/coreby removing CLI-only concerns and dependencies.Any other context or information you want to share:
I think there is also a strong case for putting the CLI in its own repo instead of just its own package:
@qwik.dev/coremeaningfully cleaner.Proposed Solution / Feature
What do you propose?
Create a new
@qwik.dev/clipackage to own theqwikcommand and move the current CLI code out of@qwik.dev/core.The first goal of this package would be to replace the current
migrate-v2flow with a new top-level command:The new CLI package would own:
migrate-v2 can remain as a compatibility alias for a transition period, but upgrade should become the primary command going forward.
Links / References
https://github.com/QwikDev/astro/tree/build/v2/libs/create-qwikdev-astro
Beta Was this translation helpful? Give feedback.
All reactions