Contributions are always welcome, no matter how large or small. Before contributing, please read the code of conduct.
Install Node.js 8+ on your system: https://nodejs.org/en/download/
- Clone down the repo
$ git clone https://github.com/netlify/netlify-dev-plugin.git
- Install dependencies
$ npm install
- Run CLI locally during development
$ ./bin/run [command]
When developing, you can use watch mode which will automatically run ava tests:
$ npm run watch
Netlify Dev Plugin 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 Mocha 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.
npm version [major, minor, patch]
Generate changelog and bump version.npm publish
Publish to npm, push version commit + tag, push latest CHANGELOG entry to GitHub release page.
By contributing to Netlify Dev Plugin, you agree that your contributions will be licensed under its MIT license.