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
Branching from discussion #11 (comment).
This is something I want to support in a potential v2.
create-react-app my-app # default like structure like now
create-react-app my-app --from empty
create-react-app my-app --from todomvc
create-react-app my-app --from relay-starter
create-react-app my-app --from you-see-where-im-going
I’m opposed to turning this project into a code generator. However I think initial templates can be useful because they offer a nice way to “clone” examples. We could move the official React examples into this system, and libraries could provide third party “starters”.
I’m not sure this is a good idea but I’d love to be able to tell people to run create-react-app my-app --from redux-todomvc instead of telling them to clone a project, run npm install, etc.
I think this would be awesome. I would totally prefer boilerplates that are using the "official react app creation setup". It's also a way for people to filter out old boilerplates - if they don't work with the most recent create-react-app, they're out of date.
It might be awkward to put a whole lot of dependencies in create-react-app but maybe you could have them be loaded by something like
create-react-app MyApp --from github.com/blah/jeiowf
or create-react-app MyApp --from npm:jims-react-boilerplate
I could see how this would be useful (especially the --from empty flag) but this could become a potential gateway for a bunch of boilerplate templates.
Activity
eanplatter commentedon Jul 19, 2016
I think it's a precarious feature because the issues you just explained.
It might be nice to merely have an empty flag and leave it at that.
lacker commentedon Jul 19, 2016
I think this would be awesome. I would totally prefer boilerplates that are using the "official react app creation setup". It's also a way for people to filter out old boilerplates - if they don't work with the most recent create-react-app, they're out of date.
It might be awkward to put a whole lot of dependencies in
create-react-appbut maybe you could have them be loaded by something likecreate-react-app MyApp --from github.com/blah/jeiowfor
create-react-app MyApp --from npm:jims-react-boilerplateinsin commentedon Jul 19, 2016
That's effectively what vue-cli does, installing boilerplates from vue-templates with some configurable bits templated.
vutran commentedon Jul 28, 2016
I could see how this would be useful (especially the
--from emptyflag) but this could become a potential gateway for a bunch of boilerplate templates.gaearon commentedon Sep 3, 2016
This would be cool but currently out of scope. We may revisit this in the future.
ericandrewlewis commentedon Jun 4, 2018
I made a little wrapper for
create-react-appthat runscreate-react-appand replacessrcwith my preferred boilerplate.