Skip to content

Latest commit

 

History

History
96 lines (61 loc) · 2.8 KB

CONTRIBUTING.md

File metadata and controls

96 lines (61 loc) · 2.8 KB

Contributions

🎉 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.

Development process

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]

Architecture

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.

Testing

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.

Pull Requests

We actively welcome your pull requests.

  1. Fork the repo and create your branch from master.
  2. If you've added code that should be tested, add tests.
  3. If you've changed APIs, update the documentation.
  4. Ensure the test suite passes.
  5. Make sure your code lints.

Releasing

  1. Install dependencies. npm ci.
  2. npm run release.

License

By contributing to Netlify Node Client, you agree that your contributions will be licensed under its MIT license.