plone / create-volto-app

Set up the Volto with a single command
MIT License
9 stars 3 forks source link

Should we consider moving to a CRA template? #17

Open pnicolli opened 4 years ago

pnicolli commented 4 years ago

There was a new release in create-react-app that allows creation of custom templates. https://github.com/facebook/create-react-app/releases/tag/v3.3.0

Should we convert volto-starter-kit to a cra-template and drop support for this create-volto-app tool?

I haven't looked into templates thoroughly yet, so I'm not 100% sure it's doable with no hassle. I would like to hear a first opinion first :)

sneridagh commented 4 years ago

@pnicolli I haven't heard of the feature, but if it fulfills our requirements we can for sure! We only need time to invest on it! I can't recall if there's something else that we do that CRA doesn't...

/cc @nileshgulia1

nileshgulia1 commented 4 years ago

@pnicolli I just saw the feature, its really good. There are two things:

CONS

  1. What if we switched to cra-template and removed create-volto-app tool and later in future if the CRA team drops support for the templates(may be), or some other feature may come up in future which doesn't allow us to create templates.

  2. The templates (for now) doesn't support scoped packages. So npx create-react-app my-app --template cra-template-@plone/volto-starter-kit would throw an error. There's a PR in progress to solve this though: https://github.com/facebook/create-react-app/pull/8167

PROS

  1. Using cra-template, we can reduce the maintenance and efforts to create-volto-app tool which generally @sneridagh manages ;).

Nonetheless, I see no major issues while switching to cra-templates, as long as its maintained by the community.