Skip to content

Contributing

Erik Barke edited this page Sep 8, 2020 · 23 revisions

Overview

This project is maintained as a Lerna monorepo and consists of the following packages, which are published on npm:

The source repository also contains example projects (not published on npm) and some of the example projects and the integration tests are run as a part of the build/test process on the CI servers.

Installation

cd karma-typescript
npm run setup

Developing

npm run ci

This will lint, build and run all tests.

For developing the karma-typescript bundler, please see the integration tests.

Code quality

To make sure the source code is consistently formatted and that it follows the same coding style everywhere, this project uses ESLint which can be run on the command line or as a plugin in lots of editors. It also has an autoFixOnSave feature which fixes formatting errors and syntax errors automatically when saving.

Pull requests

Development etiquette

  • Keep it small, try to only fix one issue or add one feature within the pull request.
  • If possible, document bugs with a unit test that fails without the bug fix.
  • Please don't bump version numbers!

Target branch

When creating the request, use the master branch as the target.

Pushing to the repository

Before pushing, run:

npm run setup
npm run ci

to make sure that:

  • The source code compiles without warnings or errors.
  • The source code passes the linter.
  • The unit tests pass.
  • The example projects run the latest karma-typescript build
  • The example projects pass

Build servers

The project has two build servers, Travis CI (unix) and AppVeyor (windows). Both build servers will:

  • lint the source code
  • build the source code
  • run the unit tests
  • run the example projects

The build servers run every time someone pushes to the repository and if anything breaks, the latest commit is flagged as broken with a red X.

A pull request that breaks the build won't get merged until it's been fixed.

Happy contributing ☺️ 🚀