Thank you for your interest in contributing! π
-
Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/react-openai-devtools.git cd react-openai-devtools -
Install dependencies
pnpm install
-
Start development
pnpm dev
react-openai-devtools/
βββ src/
β βββ components/ # React components
β βββ hooks/ # React hooks
β βββ core/ # Core mock logic
β βββ types/ # TypeScript types
βββ dist/ # Build output (generated)
βββ README.md
-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your changes and test locally:
pnpm run typecheck # Check types pnpm run build # Build the package
-
Link locally to test in a real project:
# In react-openai-devtools/ pnpm link --global # In your test project/ pnpm link --global react-openai-devtools
- Use TypeScript for all new code
- Follow existing code formatting
- Add JSDoc comments for public APIs
- Keep components simple and focused
Follow conventional commits format:
<type>(<scope>): <subject>
<body>
Types:
feat:- New featurefix:- Bug fixdocs:- Documentation changesrefactor:- Code refactoringtest:- Adding testschore:- Maintenance tasks
Examples:
feat(hooks): add useOpenAIGlobal hook
fix(toolbar): correct theme toggle behavior
docs(readme): update installation instructions
- Update the README.md if needed
- Ensure the build passes:
pnpm run build - Ensure types are correct:
pnpm run typecheck - Create a Pull Request with a clear description
Currently, the library doesn't have automated tests. If you'd like to contribute a testing setup, that would be greatly appreciated!
For now, please test manually:
- Build the library
- Link it to a test project
- Verify the feature works as expected
- Test in both development and production modes
Feel free to open an issue for any questions or discussions!