React library starter with monorepo structure, using Lerna as package manager.
The starter packages:
- example-lib (the lib source code)
- example-app (plain CRA, linked to example-lib)
The library tooling:
-
Clone this repo
-
Install dependencies
# yarn is fine too npm i
-
Run bootstrap
npm run bootstrap
This will bootstrap and link between app and lib
-
Now, it's ready!
- Change dir to
packages/example-lib
- Run start
npm start
- Change dir to
packages/example-app
npm start
- Try changing the lib, it should reflect the changes directly
- Now, you can start developing your React library!
- Make sure you've commited all the changes
- Change dir to root of this repo
- Run release (it will run
npm run build
first viaprerelease
hook)npm run release
MIT