👍🎉 First off, thanks for taking the time to contribute! 🎉👍
We use yarn
here at Courier, so please use yarn aswell so we don't have to have conflicting package.lock
and yarn.lock
files.
git clone https://github.com/trycourier/courier-react.git
cd courier-react
yarn
yarn start
After running step #4, we will start a storybook instance and this is where you will do most all of your development.
This is a monorepo using Lerna and contains many packages that are installed separately while depending on each other. All packages are versioned together.
- New packages belongs in a subdirectory of the
packages
directory. - Copy the root structure of any existing package with a
tsconfig.json
. - Add the package to the root
tsconfig.json
file references.
All commands in a monorepo are run in the root
of the project. You should never have to navigate into any of the sub-packages to do any development.
-
yarn
There is a postinstall task that will bootstrap the
lerna
project andsymlink
each package to eachother if they have dependencies to other packages in this repo. -
yarn start
This will initiate a
storybook
instance insidepackages/storybook
. THis is where all development for these packages should be done. -
yarn lerna:version
Bump the packages version, should be done before publishing. -
yarn publish
This will publish the packages to
npm
and version them together. This should only be run viagithub actions
. -
yarn typecheck
Run typechecking on each package
-
yarn build
Run
babel
and transpile each package to a consumable jsdist
folder. -
yarn clean
Cleans all
node_modules
from each package and deletes the rootnode_modules
. Sometimes useful if packages have gotten out of date.
- After landing your PR in the main, cut a release. We follow semantic versioning. If your changes are deemed breaking, please update the readme file with instructions on how users can safely migrate to a newer version of the package