Skip to main content

Working with the source

The DayPicker monorepo works together with Yarn workspaces:

Getting started

  1. Clone the monorepo and install the dependencies

    $ git clone git@github.com:gpbl/react-day-picker.git
    $ cd react-day-picker
    $ yarn install
  2. Open react-day-picker.code-workspace with vscode for a ready development environment.

Development scripts

While working with the source code you will find useful these scripts:

$ yarn workspace react-day-picker typecheck-watch # start the typecheck in watch mode
$ yarn workspace react-day-picker develop # start the build in watch mode
$ yarn workspace website start # start the website in watch mode
$ yarn workspace website typecheck-watch # start the typecheck in watch mode for website

Some These are configured to start when opening the vscode project.

Testing

In DayPicker we run unit tests and integration tests:

$ yarn workspace react-day-picker test  # run the unit tests
$ yarn workspace website test # run the integration tests

Run the relative watch script to run the test in watch mode:

$ yarn workspace react-day-picker test-watch  # run the unit tests
$ yarn workspace website test-watch # run the integration tests