Hi @orballo! Glad to hear you are interested on working on this
We haven’t been focused on this yet and we still have to do a deep research about the whole workflow in the CLI, that’s why there is a lot of information missing.
Our initial idea is to create a workflow where Frontity users can easily select their configurations just by answering questions on the CLI. A possible workflow could be:
1. Pick a theme
@frontity/mars-theme (default)
-
@frontity/twentytwenty-theme
…
- Empty theme
2. Which packages you want to install
Here we could have a list with the official Frontity packages to easily let the users decide which ones they want. It could have some of them selected by default (like wp-source
for example), but users should be able to easily deselect them. It seems this should be possible with our current CLI tool - https://github.com/SBoudrias/Inquirer.js#checkbox---type-checkbox. The list could be something like this:
Example
-
WordPress Source (recommended)
-
Tiny Router (recommended)
- [ ] AMP
-
Google Analytics
- [ ] Head Tags
…
In the future we could ask more specific questions.
3. Which configurations you want for your project
Here, as with the packages, we could have some of them selected by default.
-
TypeScript
- [ ] Git
-
Prettier
- [ ] Eslint
- [ ] Jest
- [ ] Cypress
Regarding your questions, and how to start working on these topics, I assume the best option is to work on them one by one, and discuss about them independently in each Feature Discussion. I guess it’s not necessary to do all of them together at once.
I feel the first step for most of them would be to be able to select each option directly from the create
command like we are doing with --typescript
, so we could start from there.
Going to the points you mention:
Maybe we could start by adding that possibility to the theme
option in the create command. This way, if you want to start a Frontity project with and empty theme you could do:
npx frontity create --theme empty-theme
We could name it empty-theme
or any other way. In the future, I guess that the CLI could use that.
We can talk in the Feature Discussion about what needs to happen if someone run that command.
Regarding this, I totally agree that we should provide Full TS support in frontity create. I think you know better than me which things are lacking, so feel free to list them on the Feature Discussion and we could start from there.
Moreover, it would be also great to have a starter TS theme (like mars or even simpler), but it’s something we don’t have right now neither.
- Automatically generating a Git repo when running
frontity create
(I didn’t find feature discussion)
This is also something we had in mind and it would be really nice to have. Again, I think the first step would be to allow something like:
npx frontity create my-project --git
I don’t fully understand all the things that would be needed in terms of code, so if you are interested feel free to create a Feature Discussion and we can start defining them there.
- Being able to opt out of other packages, like source and router, in case Frontity is not being used with WP (no feature about this).
As mentioned above, it would be really nice to add a new question in the CLI where users can easily do this. Again, if you are planning to work on it, feel free to open a Feature Discussion to discuss about it. If not, I will try to split all of them after Christmas