Discover a way to create a CLI install for the project
Eruption is great as it is, but isn't in the best shape as it should from a point of view of a powerful boilerplate: one that gives the developer the power of choice, to select what tools it will have in it.
At this moment, we "throw" some best practices like husky, eslint, prettier, stylelint and, maybe, they want to opt out some of them. Or maybe they want to opt in storybook with material, or an opinionated state solution, like redux or recoil.
Would be great if Eruption was able to provide that DX, but we're far from that. So any help that could point us on that direction, is welcome.
At this moment, the only solution is to create other versions of it, with more opinionated configs, but this isn't still the best DX that we can achieve, but we will get there.
I think the first step would be to move the entire structure to a template separating everything that is essential from what is not.
That way the CLI can insert the settings of each plugin eslint, husky,etc. And in relation to more complex things like redux/recoil that changes a little how the template will be structured, it would become a new template.
So basically the idea that everything that involves a change in the structure would have to be a new template to be plugged in with the settings of each plugin 🤔
Since we're using Typescript, a good start point could be writing a CLI that NPM runs interactively and collecting some input, like npm init.
From that we can throw these best practices in stubs and generate them accordingly with user response. The same way that Artisan works with publish commands. So, we can generate any .editor file based on some interactive script.
How this looks to you?
@andrepg We're working on an experimental CLI to start a new Eruption project :smile:
@devMozao @andrepg There's a beta version of the Eruption CLI: https://www.npmjs.com/package/create-eruption
@raisiqueira I believe we can close it with the latest release. What do you think?
Sure, go ahead. Let's update the main README.md to include an example how to create a new Eruption project using the CLI.
closed on the release of Eruption CLI. see here