Skip to content

Contributing

Erik Barke edited this page Oct 10, 2017 · 23 revisions

Developing

When developing, the easiest way is keep two command line tabs or windows open:

  • One that runs npm run build:watch, which watches for changes and builds the karma-typescript source code.
  • One where npm run dev is run manually as needed in the root of one of the example projects or one of the integration test suites.

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 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

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 breaks without the bug fix.

Pushing to the repository

Before pushing, make sure that:

  • The source code compiles without warnings or errors.
  • The source code passes the linter (npm run lint).
  • The unit tests pass (npm run test:unit).
  • The integration tests pass (npm test).

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 run:
    • npm run lint (runs tslint on the source code)
    • npm run build:ci (builds the karma-typescript source code)
    • npm run test:unit (runs the unit tests)
    • npm test (runs 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