Add automatically some stack configuration (ESLint, Jest...) from CLI

Description

When we do npx frontity create my-frontity-project or npx frontity create-package my-frontity-package being able of select some some automatic configurations being done for your project.

We already can add Typescript but some more interesting options could be:

  • ESLint
  • Jest

Examples

https://www.gatsbyjs.org/blog/2020-04-15-announcing-gatsby-recipes/

Possible solution

Hey, great one @juanma.

Would this be better tracked with individual features for the individual configurations?

I know we had a list somewhere:

  • Git
  • Prettier
  • Eslint
  • Jest
  • Cypress

And maybe we could do another feature to search and add official Frontity packages:

  • Gutenberg
  • AMP
  • Google Analytics
  • Head Tags

Sorry guys, I postponed it and I didn’t get notified until today. I would like to understand it a bit better because I’m not getting it. Correct me if I’m wrong but I feel that we would need three different things:

Support for individual configurations

Right now, users can add support for TypeScript just by adding --typescript while doing npx frontity dev. It’d be nice to have something similar for other configurations:

If this is the case, I think it’s better to divide them. If I am not wrong, it makes sense to do them separately right? This way, we can prioritize just one of them if needed, and even other users could join and develop the rest of them (or new ones we didn’t think about).

Feature to search and add these configurations

After doing npx frontity create we could show the list of these possible configurations, let users select which ones they want to apply, and run --typescript ourselves for example.

Example

  • :white_check_mark: TypeScript
  • [ ] Git
  • :white_check_mark: Prettier
  • [ ] Eslint
  • [ ] Jest
  • [ ] Cypress

Thiw way, we would just run --typescript and --prettier.

Feature to search and add these configurations

After doing npx frontity create we could show the list of the official frontity packages and let the users decide which ones they want to install automatically.

Example

  • :white_check_mark: Gutenberg
  • [ ] AMP
  • :white_check_mark: Google Analytics
  • [ ] Head Tags

This way, we would install Gutenberg and Google Analytics packages.


Could you explain to me if this is the case and, if not, why not please?

If this is the case I feel we’d need:

  • One FD for each individual configuration as Luis suggested.
  • One FD to show and let users select the possible configurations.
  • One FD to show and let users select the packages.
1 Like

Yes, that’s right @SantosGuillamot. I think the way you described it is the best way to go :slightly_smiling_face: