Skip to content

Commit 6d6e0c3

Browse files
committed
Add contributing doc
1 parent 8bab90d commit 6d6e0c3

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing to react-use-intercom
2+
3+
## Preparing
4+
5+
1. Install pnpm:
6+
7+
```sh
8+
npm install -g pnpm@8
9+
```
10+
11+
2. Fork and clone the repository
12+
3. Install dependencies:
13+
14+
```sh
15+
pnpm install
16+
```
17+
18+
4. The project uses a monorepo structure with pnpm workspaces:
19+
20+
- `/packages/react-use-intercom`: Main library package
21+
- `/apps/playground`: Development playground
22+
- `/apps/examples`: Example applications
23+
24+
## Development Workflow
25+
26+
1. Create a new branch for your feature/fix:
27+
28+
```sh
29+
git checkout -b your-feature-name
30+
```
31+
32+
2. Make your changes in the appropriate package
33+
34+
3. To test your changes:
35+
36+
- Start the playground: `pnpm dev`
37+
- Run the test suite: `pnpm test`
38+
- Run E2E tests: `pnpm test:e2e`
39+
40+
4. Create a changeset to document your changes:
41+
42+
```sh
43+
pnpm changeset
44+
```
45+
46+
Follow the prompts to describe your changes. This step is required for any user-facing changes.
47+
48+
5. Before submitting your PR:
49+
- Ensure all tests pass
50+
- Add or update tests as needed
51+
- Follow the existing code style
52+
- Update documentation if necessary
53+
- Verify your changeset accurately describes the changes
54+
55+
## Pull Request
56+
57+
1. Update the README.md with details of changes if applicable
58+
2. Ensure your PR includes a changeset if it includes user-facing changes
59+
60+
## Testing
61+
62+
- Write unit tests for new features
63+
- Update existing tests when modifying features
64+
- Ensure all tests pass before submitting a PR
65+
- Add E2E tests for new user-facing features
66+
67+
## Documentation
68+
69+
- Update the README.md if you add or modify features
70+
- Include JSDoc comments for public APIs
71+
- Keep documentation clear and concise

packages/react-use-intercom/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,7 @@ These props are `JavaScript` 'friendly', so [camelCase](https://en.wikipedia.org
293293
Since [v1.2.0](https://github.com/devrnt/react-use-intercom/releases/tag/v1.2.0) it's possible to delay this initialisation by passing `initializeDelay` in `<IntercomProvider />` (it's in milliseconds). However most of the users won't need to mess with this.
294294

295295
For reference see https://github.com/devrnt/react-use-intercom/pull/236 and https://forum.intercom.com/s/question/0D52G00004WxWLs/can-i-delay-loading-intercom-on-my-site-to-reduce-the-js-load
296+
297+
## Contributing
298+
299+
Contributions are welcome! Please read the [Contributing Guidelines](CONTRIBUTING.md) for details on how to contribute to the project.

0 commit comments

Comments
 (0)