-
Notifications
You must be signed in to change notification settings - Fork 109
Contributing
Erik Barke edited this page Oct 9, 2017
·
23 revisions
To make sure the code quality is always up to snuff this project uses tslint
, which can be run on command line or as a plugin in lots of editors (Visual Studio Code for instance). It also has an "autoFixOnSave" feature which fixes most formatting errors and even some syntax errors automatically on save.
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.
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
).
- 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
(runstslint
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 🚀