-
Notifications
You must be signed in to change notification settings - Fork 6
Contributing
(we use yarn instead of npm)
-
Install packages with yarn
yarn
-
Install yalc globally
We use yalc to publish packages locally and import them in test projects (instead of pushing tons of pre-* packages). It provides better isolation than
yarn link
sudo yarn global add yalc
-
Bootstrap packages
yarn packages:bootstrap
-
Make your local Henri binary available globally
yarn run link
-
Link your global bin directory to your PATH
Run
yarn global bin
to get the directory to manually add to your PATH You might need to addPATH="$PATH:$HOME/.yarn/bin"
to your.profile
(Linux) and usesource .profile
to activate changes
Something like this might do the job:
$ echo "PATH=\"\$PATH:\$HOME/.yarn/bin\"" >> $HOME/.profile && source $HOME/.profile
-
Test your install
Try to create a new project with
henri new henri-test-project
-
Link your local packages with the test project
Use yalc to link project inside your henri repository to your new project with:
yalc add @usehenri/mongoose @usehenri/react
You will then be able to make changes in your Henri repository and deploy them locally to your test projects
Don't forget to
yalc push
to deploy your changes@usehenri/react: you need to build prior to deploying with:
cd packages/react && yarn run local
-
Test your changes
Run the test suite with
yarn test:watch
.Remember to add relevant tests covering your changes.
Sometimes, you might get random test errors caused by the @usehenri/disk package -- trigger a new test until it is fixed