File size: 2,820 Bytes
cf86710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Contributing to DayPicker

You are welcome to join the [DayPicker contributors](https://github.com/gpbl/react-day-picker/graphs/contributors) and help us build the best date picker for React.

## Ways to Contribute

There are many ways to contribute to the development of DayPicker:

- Improve our build tools and GitHub actions
- Open PRs with new features, bug fixes, and improved rendering performance
- Align the source code with the latest TypeScript/React practices
- Help with unit and integration tests
- Proofread [our website](https://daypicker.dev/) and the code documentation in the source files
- Make the website more stylish
- Help maintain [the repository](https://github.com/gpbl/react-day-picker) on GitHub and triage issues and PRs
- Answer [support questions](https://github.com/gpbl/react-day-picker/discussions/categories/support)
- [Sponsor the project](https://github.com/sponsors/gpbl)

[Send a message](https://github.com/gpbl/react-day-picker/discussions) on our discussions page to introduce yourself!

## Working With the Source Code

DayPicker is built using the following tools and libraries:

- [pnpm](https://pnpm.io/) - for package management
- [TypeScript](https://www.typescriptlang.org/) with [React](https://reactjs.org/)
- [Docusaurus](https://docusaurus.io/) - for the documentation website
- [Vite](https://vitejs.dev/) - for the examples app
- [Jest](https://jestjs.io/) - for unit tests

To contribute to DayPicker, start by cloning the repository:

```sh
git clone https://github.com/gpbl/react-day-picker.git
cd react-day-picker
pnpm install
```

### DayPicker Workspace

If your are using [Visual Studio code](https://code.visualstudio.com) open the [react-day-picker.code-workspace](https://github.com/gpbl/react-day-picker/blob/main/react-day-picker.code-workspace) to set up the development environment. This workspace includes:

- Suggested extensions for the project
- TypeScript compiler running in watch mode for the ESM export
- Docusaurus website running at http://localhost:2001, with documentation and API docs
- Vite.js examples app served at http://localhost:5173
  - Use this app to run isolated test cases and examples, exported by `/examples/index.ts`

### Test Driven Development

DayPicker development is test-driven. Change code and run the tests using `pnpm run test-watch` or `pnpm run test`. The Jest plugin in the VS Code workspace is recommended for running tests.

### Useful Scripts

- To run the build in watch mode:
  ```sh
  pnpm tsc --project tsconfig-esm.json --watch
  ```
- To run the tests in watch mode:
  ```
  pnpm run test-watch
  ```
- To run the examples app at http://localhost:5173
  ```
  pnpm --filter examples-app run dev
  ```
- To run the documentation at http://localhost:2001:
  ```
  pnpm --filter website run start
  ```