- ⚛️ Create React App 3 (React 17)
- 🐈 Yarn Workspaces
- 🐉 Lerna 3
- ✨ Host Multiple CRA Apps, Component Libraries & Storybooks in one Monorepo
- 🔥 Hot Reload all Apps, Components & Storybooks
- 👨🔬 Test all workspaces with Eslint & Jest using one command
- Git >2.25.0
- Yarn >1.13.0
- Node >11.14.0
git clone this-repo
yarnyarn workspace <workspace_name> <command>This will run the chosen Yarn command in the selected workspace.
Example:
yarn workspace my-app add react-router-dom --devThis will add react-router-dom as dependencies in your packages/my-app/package.json. To remove dependency use remove instead of add
yarn add <dependency_name> -WMake it explicit by running with the -W flag (or --ignore-workspace-root-check)
From your project root type start command for desired app
yarn workspace @project/portal startAll available start scripts
"scripts": {
"start:portal": "yarn workspace @project/portal start",
"start:storybook": "yarn workspace @project/storybook storybook",
...
}yarn start:storybookyarn workspace <workspace-root> testCommon types according to commitlint-config-conventional (based on the the Angular convention) can be:
- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test