Skip to content

Latest commit

 

History

History
152 lines (101 loc) · 2.69 KB

CONTRIBUTING.md

File metadata and controls

152 lines (101 loc) · 2.69 KB

Contributing

Table of Contents

All pull requests are welcome! By participating in this project, you agree to abide by our code of conduct.

Fork

Fork, then clone the repository:

# replace <USER> with your username
git clone git@github.com:<USER>/braze-node.git
cd braze-node

Use nvm to set the Node.js version:

nvm use

Install the package dependencies:

npm install

Make your changes, add tests/documentation, and ensure tests and lint pass:

npm test
npm run lint
npm run lint:tsc

Write a commit message that follows the Conventional Commits specification:

  • feat: A new feature
  • fix: A bug fix
  • perf: A code change that improves performance
  • refactor: A code change that neither fixes a bug nor adds a feature
  • test: Add missing tests or correct existing tests
  • docs: Documentation only changes

The commit message will be linted during the pre-commit Git hook. To manually lint the most recent commit message:

git log -1 --pretty=format:"%s" | npx commitlint

Push to your fork and create a pull request.

At this point, wait for us to review your pull request. We'll try to review pull requests within 1-3 business days. We may suggest changes, improvements, and/or alternatives.

Here are some things that will improve the chance that your pull request will be accepted:

Test

Run tests with coverage:

npm test

Run tests in watch mode:

npm run test:watch

Run tests in CI mode:

npm run test:ci

View the coverage report in your browser:

open coverage/lcov-report/index.html

Lint

Run ESLint:

npm run lint

Fix lint errors:

npm run lint:fix

Check types:

npm run lint:tsc

Docs

Generate TypeDoc:

npm run docs

Generate docs in watch mode:

npm run docs:watch

View docs in your browser:

open docs/index.html

Release

Release and publish are automated with Release Please.