Rethink templating
See original GitHub issueI mentioned to @NMinhNguyen that I had a few misgiving when adding a templating feature.
-
Partly, the implementation is a little confusing right now due to the way we are piggy-backing on the installation of
create-react-app
. There are changes thatcreate-react-app
makes which are not part of its template and we then need to undo or amend. It’d be nicer if everything was just copied across from a single folder. -
More substantively, a
widget
is dependent on anapp
, so if the configuration of anapp
and verson ofmodular
installed doesn’t include support for TypeScript you should not be able to install awidget
that depends on this. I’m not suggesting that we add validation – probably it means that the template for a widget is stored within themodular
package (for now calledmodular-scripts
). This was brought up by @threepointone a week or so ago, and I’m writing it down now for posterity. -
Finally, there are now three templates (repo, app and widget). Currently, only
app
andwidget
are configurable, and we will likely wantrepo
to be configurable, too. (If/when this is required, it might need to support something like wizards.)
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top GitHub Comments
Leaving this open for a bit, will close by the end of the week if no new info presents itself.
I’m also a big fan of changing my mind when presented with new information 😛
Yeah, let’s just remove the
template
arg for now (happy to do it myself too if you’d like, I could send it as soon as tonight)