Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !6514

Add template support

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/mrmckeb/feature/templates into master Feb 25, 2019
  • Overview 9
  • Commits 3
  • Pipelines 0
  • Changes 29

Created by: mrmckeb

This is a work in progress. Do not merge.

This has become a little more complicated than I first envisioned. Right now, I'm still working through the init part of this. The plan is as follows:

  • react-scripts and create-react-app-template-* are installed as dependencies. Either or both of those can be defined via CLI.
    • Default is current default template.
    • Although the supported scripts version (range) is included in the template's peerDependencies, this is not used during install.
  • Upon react-scripts init, the template is copied from template package, and peerDependencies are installed from that package (excluding the scripts-version). That package is then removed, as it no longer has any value.
    • When using non-standard scripts, or a scripts version that is below the peerDependencies of the template, appropriate warnings will be shown - but the user can still continue. This, importantly, allows custom scripts versions to work with the template.
    • Optionally, the scripts version range could be in engines... but that doesn't feel clean.

The typescript flag is deprecated under this process.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/mrmckeb/feature/templates