Skip to content

Commit 7b42f0c

Browse files
committed
docs: enhance CONTRIBUTING.md with detailed setup and PR guidelines
1 parent 2971431 commit 7b42f0c

File tree

1 file changed

+96
-10
lines changed

1 file changed

+96
-10
lines changed

CONTRIBUTING.md

Lines changed: 96 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,113 @@
1-
# Set up for local development
1+
# Contributing to frames.js
22

3-
First, ensure that the following are installed globally on your machine:
3+
Thank you for your interest in contributing to frames.js! This guide will help you get started.
4+
5+
## Prerequisites
6+
7+
Ensure that the following are installed globally on your machine:
48

59
- Node.js 18.7+
6-
- Yarn
10+
- Yarn (1.22.x)
11+
12+
## Set up for local development
13+
14+
1. Clone the repository:
15+
```bash
16+
git clone https://github.com/framesjs/frames.js.git
17+
cd frames.js
18+
```
19+
20+
2. Install dependencies:
21+
```bash
22+
yarn install
23+
```
24+
25+
3. Run all packages in development mode:
26+
```bash
27+
yarn dev
28+
```
29+
30+
4. To run any individual package from its directory:
31+
```bash
32+
cd packages/<package-name>
33+
yarn dev
34+
```
35+
Note: You may need to rebuild other packages first.
36+
37+
## Running Tests
38+
39+
Run the full test suite:
40+
```bash
41+
yarn test:ci
42+
```
43+
44+
Run tests in watch mode (for development):
45+
```bash
46+
yarn test
47+
```
48+
49+
## Code Style
750

8-
1. In the root directory, run `yarn install`
9-
2. Run all packages by running `yarn dev` from the root folder.
10-
3. To run any individual package from it's directory, run `yarn dev`, but you may need to rebuild any other packages
51+
- We use Prettier for code formatting. Run `yarn format` to format your code.
52+
- Follow TypeScript best practices and ensure your code passes linting with `yarn lint`.
53+
- Add JSDoc comments to public functions and classes.
1154

12-
# Changesets
55+
## Changesets
1356

1457
All PRs with meaningful changes should have a changeset which is a short description of the modifications being made to each package. Changesets are automatically converted into a changelog when the repo manager runs a release process.
1558

16-
## Add a new changeset
59+
### Add a new changeset
1760

61+
```bash
1862
yarn changeset
63+
```
1964

20-
## Create new versions of packages
65+
### Create new versions of packages
2166

67+
```bash
2268
yarn changeset version
69+
```
2370

24-
## Publish all changed packages to npm
71+
### Publish all changed packages to npm
2572

73+
```bash
2674
yarn changeset publish
2775
git push --follow-tags origin main
76+
```
77+
78+
## Pull Request Checklist
79+
80+
Before submitting your PR, please ensure:
81+
82+
- [ ] Code follows the project's coding standards
83+
- [ ] All tests pass (`yarn test:ci`)
84+
- [ ] Linting passes (`yarn lint`)
85+
- [ ] You've added a changeset if applicable
86+
- [ ] You've added/updated tests for your changes
87+
- [ ] You've updated documentation if needed
88+
- [ ] Your commit messages follow conventional commits format
89+
90+
## Troubleshooting
91+
92+
### TypeScript Config Issues
93+
94+
If you encounter TypeScript configuration errors, try:
95+
```bash
96+
yarn build:ci
97+
```
98+
99+
This will build all packages and resolve type dependencies.
100+
101+
### Dependency Issues
102+
103+
If packages aren't resolving correctly:
104+
```bash
105+
rm -rf node_modules
106+
yarn install
107+
```
108+
109+
## Need Help?
110+
111+
- Join the [/frames-dev](https://warpcast.com/frames-dev) channel on Farcaster
112+
- Check existing issues on GitHub
113+
- Read the [documentation](https://framesjs.org)

0 commit comments

Comments
 (0)