Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yangshun/flow-monorepo
Monorepo setup for npm projects with Flow
https://github.com/yangshun/flow-monorepo
babel boilerplate flow jest lerna monorepo
Last synced: about 2 months ago
JSON representation
Monorepo setup for npm projects with Flow
- Host: GitHub
- URL: https://github.com/yangshun/flow-monorepo
- Owner: yangshun
- License: mit
- Created: 2019-10-15T07:38:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-13T01:47:05.000Z (about 3 years ago)
- Last Synced: 2024-04-26T00:25:11.053Z (8 months ago)
- Topics: babel, boilerplate, flow, jest, lerna, monorepo
- Language: JavaScript
- Homepage:
- Size: 987 KB
- Stars: 7
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flow Monorepo
Template repository to demonstrate how to set up a monorepo with Flow. Other tools include:
- Babel
- ESLint
- Flow
- Jest
- Lerna
- Prettier
- Rollup
- Terser
- Yarn## Getting started
Install dependencies
```sh
$ yarn
```Rename package scope. Search for `@yangshun` in the repository and make the following changes:
1. Update import statements in `packages`
1. Update the Jest/Flow config mapping in `jest.config.js` and `.flowconfig`## Directory structure
```
├── packages
│ ├── bar
│ │ ├── __tests__
│ │ │ └── bar.test.js
│ │ ├── src
│ │ │ └── index.js
│ │ └── package.json
│ └── foo
│ ├── __tests__
│ │ └── foo.test.js
│ ├── src
│ │ └── index.js
│ └── package.json
└── package.json
```## Commands
- `yarn build` - Runs rollup on all packages to build bundles for each environment
- `yarn check-all` - Runs all necessary checks, tests and builds. Useful for CI environments
- `yarn clean` - Removes all the rollup bundle directories in each package
- `yarn flow` - Checks the `packages` directory for Flow violations
- `yarn prettier` - Formats all the files in all the JS files
- `yarn prettier:report` - Reports any formatting violations in all the JS files
- `yarn publish-packages` - Runs Lerna publish
- `yarn lint` - Fixes the ESLint violations in all the JS files
- `yarn lint:report` - Reports ESLint violations in all the JS files
- `yarn test` - Tests all the files with Jest