Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 2.02 KB

CONTRIBUTING.md

File metadata and controls

59 lines (39 loc) · 2.02 KB

Contributing

This library is a community effort: it can only be great if we all help out in one way or another!

Development workflow

The project uses a monorepo structure for the packages managed by npm workspaces and lerna. To get started with the project, run npm i in the root directory to install the required dependencies for each package:

npm i

Make sure your code passes TypeScript and ESLint. Run the following to verify:

npm run typescript
npm run lint

To fix formatting errors, run the following:

npm run lint --fix

Remember to add tests for your change if possible. Run the unit tests by: (Not yet implemented; there are currently no tests for these packages)

npm run test

Linting and tests

ESLint, Prettier, TypeScript

We use TypeScript for type checking, ESLint with Prettier for linting and formatting the code, and Jest for testing (not yet implemented).

Scripts

The package.json file contains various scripts for common tasks:

  • npm run typescript: type-check files with TypeScript.
  • npm run lint: lint files with ESLint.
  • npm run test: run unit tests with Jest.
  • npm run clean: clean all packages.
  • npm run build: build all packages.
  • npm run publish: publish all packages.
  • npm run release: shorthand for build & publish.

Publishing

Maintainers with write access to the GitHub repo and the npm organization can publish new versions. To publish a new version, first, you need to export a GH_TOKEN environment variable as mentioned here. Then run:

npm run release

This will automatically bump the version and publish the packages. It'll also publish the changelogs on GitHub for each package.