Skip to content

Contributing

Felix-Antoine Paradis edited this page Jan 13, 2020 · 4 revisions

Installation

(we use yarn instead of npm)

  1. Install packages with yarn

    yarn

  2. 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

  3. Bootstrap packages yarn packages:bootstrap

  4. Make your local Henri binary available globally

    yarn run link

  5. 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 add PATH="$PATH:$HOME/.yarn/bin" to your .profile (Linux) and use source .profile to activate changes

Something like this might do the job:

$ echo "PATH=\"\$PATH:\$HOME/.yarn/bin\"" >> $HOME/.profile && source $HOME/.profile
  1. Test your install

    Try to create a new project with henri new henri-test-project

  2. 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

  3. 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

Clone this wiki locally