1 | CONTRIBUTING
|
2 | ============
|
3 |
|
4 | 1. Fork the repo and clone locally
|
5 | 2. In locally cloned repo: `npm install && npm run setup`
|
6 | * This will the build fro the library and all the demo apps
|
7 | 3. Prove existing code:
|
8 | * Run the unit tests: `npm test`
|
9 | * Run the end-to-end tests (see section below)
|
10 | 4. Make changes in `src` folder
|
11 | * **Tip**: use `npm run test:w` to verify your changes on save
|
12 | 5. Add additional unit tests in `test` folder. These should cover your changes
|
13 | 6. *Optionally* add end-to-end tests in `e2e` folder
|
14 | 7. Prove changes:
|
15 | * Run the unit tests: `npm test`
|
16 | * Run the end-to-end tests (see section below)
|
17 | 8. Commit changes: `npm run cm`
|
18 | - why use **npm** and not **git** to commit? See "Conventional commit message" section below
|
19 | 9. Push your changes to your fork and submit a pull request
|
20 |
|
21 |
|
22 | ## Running end-to-end tests
|
23 |
|
24 | * In one terminal window: `npm run e2e-server`
|
25 | * In another terminal window: `npm run e2e`
|
26 | * **Tip**: use `npm run e2e-only` if you already have built source code (ie you've `npm run setup` or `npm run build:all`)
|
27 |
|
28 |
|
29 | ## Conventional commit message
|
30 |
|
31 | This project uses the structure of the commit message to:
|
32 |
|
33 | 1. Generate release notes like you see in [this release](https://github.com/esvit/ng-table/releases/tag/v2.0.0)
|
34 | 2. Generate the next version number for the npm package using the rules of [semver](http://semver.org/)
|
35 | 3. Trigger the publish a release of this library to npm using [semantic-release](https://github.com/semantic-release/semantic-release)
|
36 |
|
37 | These conventions are detailed here: [angular commit message conventions](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md)
|
38 |
|
39 | ### Commitizen command line tool
|
40 |
|
41 | To help you to follow these conventions this project uses [Commitizen](https://github.com/commitizen/cz-cli).
|
42 |
|
43 | Commitizen provides a command line tool that will help you create a commit message that matches these conventions.
|
44 |
|
45 | To lauch this tool we use `npm run cm`. |
\ | No newline at end of file |