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
  • !419

Initial monorepo configuration

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/ryanyogan/monorepo into master Aug 11, 2016
  • Overview 16
  • Commits 10
  • Pipelines 0
  • Changes 43

Created by: ryanyogan

This PR augments the directory structure to conform to a multi-package "monorepo"

Tree structure changes

create-react-app/
+-- .travis.yml
+-- CHANGELOG.md
+-- CONTRIBUTING.md
+-- LICENSE
+-- PATENTS
+-- README.md
+-- packages/
    +-- create-react-app/  [originally global-cli]
    |   +-- index.js
    |   +-- package.json  [maintaining independent packages]
    +-- react-scripts/  [originally root directory]
    |   +-- bin/
    |   +-- config/
    |   +-- scripts/
    |   +-- template/  [originally in root directory]
    |   +-- .eslintrc.js
    |   +-- .gitignore
    |   +-- package.json [maintaining independent packages]
+-- tasks/
|   +-- e2e.sh
|   +-- release.sh

Status

Given this PR modifies a good portion of the application structure, it may go out of sync quickly.

This PR has been updated to reflect: master: 7c912b5ffe48eda1c8b0b6f005a117d5764eb0a6 on August 15th, 2016 at 12:15PM PDT

Please ping @ryanyogan if you are reviewing and it is no longer in sync.

How to test

  • From the root directory run sh tasks/e2e.sh or cd packages/react-scripts && npm run e2e
  • Manual install of CLI
    • cd packages/create-react-app
    • npm uninstall create-react-app -g we need to remove your official package temporarily
    • npm i . -g <-- this command will install from the local directory
    • Note: npm uninstall create-react-app -g when complete, you don't want this test to clash with the official package. Now you can go back to the official npm i create-react-app -g
  • Further testing
    • cd packages/create-react-app && npm i cd packages/react-scripts && npm i && npm run create-react-app test-app
    • Test the build process: npm run build
      • You will now have a build folder in the root directory, don't forget to trash it.
    • Remember this will create an application named test-app in the packages/react-scripts directory, you will want to trash that once complete. You will also have a node_modules folder in both the packages/create-react-app folder and the packages/react-scripts folder, you will want to delete them with rm -rf node_modules in the respective directory.

Noteable changes / todo's

  • I made changes that hop around directories in the tasks/e2e.sh file, I am not happy with them I think this file can be improved upon.
  • Splitting up the paths file into separate modules in addition to making it a tad smarter would help in the future.
  • I started toying around with Lerna.js in "independant" mode per @hzoo's advice and I found it to be quite nice. Perhaps this would be a nice next step, however I see other issues that should be cleaned up first.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/ryanyogan/monorepo