Skip to content

Latest commit

 

History

History
81 lines (52 loc) · 1.87 KB

development-guide.md

File metadata and controls

81 lines (52 loc) · 1.87 KB

Development Guide

Before contributing to this open source project, read our CONTRIBUTING. We gratefully welcome improvements to documentation as well as to code.

The code base is a monorepo. We use Lerna for managing inter-module dependencies, which makes it easier to develop coordinated changes between the modules. Instead of running lerna directly, the commands are wrapped with npm;

Requirements

Since this project supports multiple Node versions, using a version manager such as nvm is recommended.

To get started once you have Node installed, run:

npm install

This will install all the necessary modules.

Testing

Unit Tests

To run the all unit tests, use:

npm run test

To run the unit tests continuously in watch mode while developing, use:

npm run tdd

Linting

We use gts to make sure that new code is conform to our coding standards.

Before raising a pull request, make sure there are no lint problems.

To check the linter, use:

npm run lint

To fix the linter, use:

npm run lint:fix

Continuous Integration

We rely on CircleCI 2.0 for our tests. If you want to test how the CI behaves locally, you can use the CircleCI Command Line Interface as described here: https://circleci.com/docs/2.0/local-jobs/

After installing the circleci CLI, simply run one of the following:

circleci build --job lint
circleci build --job node8
circleci build --job node10
circleci build --job node11
circleci build --job node12
circleci build --job node12-browsers

Docs

We use typedoc to generate the api documentation.

To generate the docs, use:

npm run docs

The document will be available under packages/opentelemetry-api/docs/out path.