🎉 Thanks for considering contributing to this project! 🎉
These guidelines will help you send a pull request.
If you're submitting an issue instead, please skip this document.
If your pull request is related to a typo or the documentation being unclear, please click on the relevant page's Edit
button (pencil icon) and directly suggest a correction instead.
This project was made with ❤️. The simplest way to give back is by starring and sharing it online.
Everyone is welcome regardless of personal background. We enforce a Code of conduct in order to promote a positive and inclusive environment.
First fork and clone the repository. If you're not sure how to do this, please watch these videos.
Run:
npm install && npm run site:build:install
Tests are run with:
npm test
In watch mode:
npm run watch
Make sure everything is correctly setup by running those tests first.
ESLint and Prettier are performed automatically on git push
. However, we recommend you setup your IDE or text editor
to run ESLint and Prettier automatically on file save. Otherwise, you should run them manually using:
npm run format
Alternatively you can setup your IDE to integrate with Prettier and ESLint for JavaScript and Markdown files.
To run the CLI locally:
./bin/run [command]
The CLI is written using the oclif cli framework and the netlify/js-client open-api derived API client.
- Commands live in the
src/commands
folder. - The base command class which provides consistent config loading and an API client lives in
src/base
. - Small utilities and other functionality live in
src/utils
.
A good place to start is reading the base command README and looking at the commands folder.
This repo uses ava for testing. Any files in the src
directory that have a .test.js
file extension are automatically detected and run as tests.
We also test for a few other things:
- Dependencies (used an unused)
- Linting
- Test coverage
- Must work with Windows + Unix environments.
We actively welcome your pull requests.
- Fork the repo and create your branch from
master
. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
- Install dependencies.
npm ci
. npm run release
.
By contributing to Netlify Node Client, you agree that your contributions will be licensed under its MIT license.