Skip to content

Contributing

Erik Barke edited this page Nov 1, 2018 · 23 revisions

Installation

cd karma-typescript
npm run setup

This will install all npm packages for karma-typescript, all the example projects and all the integration test projects.

Developing

The example projects and integration test projects have development scripts in karma-typescript/package.json that will build/install karma-typescript itself, and run the tests:

  • npm run dev:examples:angular2
  • npm run dev:examples:angularjs
  • npm run dev:examples:mocha
  • npm run dev:examples:typescript-1.6.2
  • npm run dev:examples:typescript-latest
  • npm run dev:tests:integration-1.8.10
  • npm run dev:tests:integration-latest

Code quality

To make sure the source code is consistently formatted and follows the same coding style everywhere, this project uses tslint 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 even syntax errors automatically when saving.

Pull requests

Development

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 or an integration test that fails without the bug fix.

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.
  • All example projects and integration test projects run the latest karma-typescript build
  • The example projects pass
  • The integration tests pass.

Build servers

  • The project has two build servers, Travis CI (unix) and AppVeyor (windows). Both build servers install the example projects and the integration test projects and then:
    • lint the source code
    • build the source code
    • run the unit tests
    • run the example projects and the integration test 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 ☺️ 🚀

Clone this wiki locally