First please read and abide by the Code of Conduct.
Everything you need is a stable version of Node.JS (v8+).
The source code is written in TypeScript and all the ES2017 features. We are following the TSLint and Editorconfig rules listed at their config files. We strongly recommend to use a code editor with good support for these tools (we recommend VSCode), so that it is easy to integrate new code into our code base.
After cloning the project and installing the dependencies with npm install
you should be able start coding.
You can double check if the local environment is fully working by running the tests with npm test
and building the project with npm run build
.
Execute unit tests and check coverage:
npm test
Execute unit tests in watch mode for TDD purposes:
npm run tdd
Lint Typescript code:
npm run lint
Commit convention helper (see related topic below):
npm run commit
Generate API reference documentation locally:
npm run docs
Build the project locally:
npm run build
This repository follows a strict Commit Message Conventions, which leads to more readable messages that are easy to follow when looking through the project history. Also, we use the git commit messages to generate the change log, calculate the new version number and automatically publish new versions to NPM. For these purposes, we are using Semantic Release. We have a helper script npm run commit
that provides a command line based wizard for easy commit message formatting.
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
Only the first line is mandatory, and any line of the commit message cannot be longer than 100 characters! A linter will check your commit message in a git hook for each commit and guide you to fix any error. Please take a look at the AngularJS Commit Message Conventions for detailed information about this convention.
Before you submit your Pull Request (PR) consider the following guidelines:
-
Search our repository for an open or closed PR that relates to your submission. You don't want to duplicate effort.
-
Fork the project on Github
-
Make your changes in a new git branch:
git checkout -b my-fix-branch master
-
Create your patch, following code style guidelines, and including appropriate test cases.
-
Run the full test suite and ensure that all tests pass.
-
Commit your changes using a descriptive commit message that follows our commit message format:
npm run commit
-
Push your branch to your GitHub fork:
git push origin my-fix-branch
-
In GitHub, send a pull request to
ng-jexia:master
. -
Check if our Continuous Integration checks passed against your PR and make the necessary fixes if something breaks.
-
If we suggest changes then:
-
Please apply the required updates.
-
Re-run the test suites to ensure tests are still passing.
-
Re-run performance tests to make sure your changes didn't hurt performance.
-
Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
git rebase master -i git push -f
-
That's it! Thank you for your contribution!