Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built-in project templates #24

Closed
gaearon opened this issue Jul 19, 2016 · 6 comments
Closed

Built-in project templates #24

gaearon opened this issue Jul 19, 2016 · 6 comments

Comments

@gaearon
Copy link
Contributor

gaearon commented Jul 19, 2016

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.

@eanplatter
Copy link
Contributor

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
Copy link
Contributor

lacker commented 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-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

@insin
Copy link
Contributor

insin commented Jul 19, 2016

That's effectively what vue-cli does, installing boilerplates from vue-templates with some configurable bits templated.

@vutran
Copy link

vutran commented Jul 28, 2016

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.

@gaearon
Copy link
Contributor Author

gaearon commented Sep 3, 2016

This would be cool but currently out of scope. We may revisit this in the future.

@gaearon gaearon closed this as completed Sep 3, 2016
@ericandrewlewis
Copy link

I made a little wrapper for create-react-app that runs create-react-app and replaces src with my preferred boilerplate.

@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants