Contributing¶
Thanks for taking the time to improve ninejs. This guide covers the local setup and the main checks to run before opening a pull request.
Before making changes, comment on an existing issue or open a new one.
Fork and clone¶
Fork the repository on GitHub, then clone your fork locally:
git clone git@github.com:<your-username>/ninejs.git
cd ninejs
git remote add upstream https://github.com/y-sunflower/ninejs.git
git fetch upstream
Create a branch for your change:
Prerequisites¶
Install these tools before setting up the project:
- Git
uvfor Python dependency managementbunfor JavaScript dependencies and tests- (optional but recommended)
justfor running project tasks - (optional but recommended)
prettieron yourPATH, used by the formatting check
Install dependencies¶
Install Python dependencies, JavaScript dependencies, and the Chromium browser used by Playwright:
Run tests¶
Run the full test suite:
This runs both the Python tests and the JavaScript tests. The Python test run includes the Playwright-backed browser tests.
To run smaller subsets:
Note that once you've made changes, do some manual testing too. Update the examples from the doc with just examples, run just doc to preview the doc and make sure examples still work as expected.
Formatting and checks¶
Run the repository check command before opening a pull request:
This runs:
- Type checking
- Code formatting/linting
- Building the docs
Documentation¶
Serve the documentation locally with:
Then open http://localhost:8000 to preview the documentation website.
For more detail: