Skip to content

Built-in project templates #24

Closed
Closed

Description

@gaearon

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.

Activity

  1. eanplatter commented on Jul 19, 2016

    @eanplatter
    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.

  2. lacker commented on Jul 19, 2016

    @lacker
    Contributor

    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

  3. insin commented on Jul 19, 2016

    @insin
    Contributor

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

  4. vutran commented on Jul 28, 2016

    @vutran

    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.

  5. gaearon commented on Sep 3, 2016

    @gaearon
    ContributorAuthor

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

  6. ericandrewlewis commented on Jun 4, 2018

    @ericandrewlewis

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

  7. locked and limited conversation to collaborators on Jan 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions