Adding CLI to existing projects #222
Replies: 1 comment 3 replies
-
These are great observations, and they come at the perfect time. I was actually thinking about how we could improve the CLI to enable integration with other JSX frameworks like React, Preact, or Solid. Regarding adding to an existing project, the question about copying the template files is intended to allow the merging of files like Regarding Git initialization, the current implementation could be improved. When the project already exists, it would make more sense to perform a commit for the addition of I will also adjust the order of the questions and the default responses, removing those that are unnecessary for adding to an existing project. I will take care of updating the |
Beta Was this translation helpful? Give feedback.
-
@siguici I've noticed it seems like we could significantly improve usage by optimizing the workflow of existing projects. (which it's currently at an all time high organically!! 🎊 )
Adding to existing Astro projects is the most likely outcome I think, as many are coming from another framework and trying Qwik. I think we can be most helpful by having this first in the readme even, along with the creating new project docs right after it.
The "ideal" Developer Experience Goal:
TLDR: "It just works" when you hit Enter 🚀
Perhaps something like:
which would be the equivalent of the current:
I'm also noticing certain options are more suited for when a project is created from scratch.
These are the options I would pick if I was starting from an existing Astro project in the current CLI options. In this case, we likely already have git initialized.
The defaults could potentially be:
My current thoughts, is the github readme should immediately go into:
A potential new option to the CLI init I think that would be beneficial:
Does your project have React, Solid, or Preact? (default: we need to collect some data points here in this case)
If they hit yes:
include
statement pointing to the Qwik integration directoryexclude
statement for other framework adaptersjsxImportSource
conflicts with other frameworkshttps://github.com/kunai-consulting/public-astro-PoC/blob/main/src/components/qwik/tsconfig.json
similar to here
Example structure:
potential follow up:
Thoughts? The CLI is so great already, and I defer to your judgement on this :)
Beta Was this translation helpful? Give feedback.
All reactions