You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if we can remove the link between the package version and the templates that the CLI uses to generate new components. Currently, it's really awkward to change a template, say fix a typo, then all users need to update their global cra-generate version, which, tbh, no one does.
The solution
I propose that we move the templates to a different package and have cra-generate install a new version per project (think npm install --save-dev cra-generate-templates@latest). Doing it like this, we get a fresh version of the templates for each project that uses cra-generate and we can utilize npm's caching.
It would be great if we can remove the link between the package version and the templates that the CLI uses to generate new components. Currently, it's really awkward to change a template, say fix a typo, then all users need to update their global
cra-generate
version, which, tbh, no one does.The solution
I propose that we move the templates to a different package and have
cra-generate
install a new version per project (thinknpm install --save-dev cra-generate-templates@latest
). Doing it like this, we get a fresh version of the templates for each project that uses cra-generate and we can utilize npm's caching.Here's how I imagine the flow:
Use in a new project:
Use in a project that already installed the templates:
Use offline:
cra-generate
should have a dependency on the templates itself and use in case of network loss.Drawbacks
Other possible solutions
The text was updated successfully, but these errors were encountered: