|
| 1 | +# Contributing to @ngxpert/input-otp |
| 2 | + |
| 3 | +🙏 We would ❤️ for you to contribute to @ngxpert/input-otp and help make it even better than it is today! |
| 4 | + |
| 5 | +## Developing |
| 6 | + |
| 7 | +Start by installing all dependencies: |
| 8 | + |
| 9 | +```bash |
| 10 | +npm i |
| 11 | +``` |
| 12 | + |
| 13 | +Run the playground app: |
| 14 | + |
| 15 | +```bash |
| 16 | +npm run watch:lib |
| 17 | + |
| 18 | +# in another terminal |
| 19 | +npm start |
| 20 | +``` |
| 21 | + |
| 22 | +## Testing |
| 23 | + |
| 24 | +### Run cypress tests |
| 25 | + |
| 26 | +```bash |
| 27 | +npm start |
| 28 | + |
| 29 | +# in another terminal |
| 30 | +npx cypress open |
| 31 | +``` |
| 32 | + |
| 33 | +Cypress window will open, you can click on individual tests. |
| 34 | + |
| 35 | +## <a name="rules"></a> Coding Rules |
| 36 | + |
| 37 | +To ensure consistency throughout the source code, keep these rules in mind as you are working: |
| 38 | + |
| 39 | +- All features or bug fixes **must be tested** by one or more specs (unit-tests). |
| 40 | +- All public API methods **must be documented**. |
| 41 | + |
| 42 | +## <a name="commit"></a> Commit Message Guidelines |
| 43 | + |
| 44 | +### TL;DR |
| 45 | + |
| 46 | +Simply run commit script after staging your files to take care about commit message guidelines |
| 47 | + |
| 48 | +```bash |
| 49 | +npm run commit |
| 50 | +``` |
| 51 | + |
| 52 | +### Details |
| 53 | + |
| 54 | +We have very precise rules over how our git commit messages can be formatted. This leads to **more |
| 55 | +readable messages** that are easy to follow when looking through the **project history**. But also, |
| 56 | +we use the git commit messages to **generate the changelog**. |
| 57 | + |
| 58 | +#### Commit Message Format |
| 59 | + |
| 60 | +Each commit message consists of a **header**, a **body** and a **footer**. The header has a special |
| 61 | +format that includes a **type**, a **scope** and a **subject**: |
| 62 | + |
| 63 | +``` |
| 64 | +<type>(<scope>): <subject> |
| 65 | +<BLANK LINE> |
| 66 | +<body> |
| 67 | +<BLANK LINE> |
| 68 | +<footer> |
| 69 | +``` |
| 70 | + |
| 71 | +The **header** is mandatory and the **scope** of the header is optional. |
| 72 | + |
| 73 | +Any line of the commit message cannot be longer 100 characters! This allows the message to be easier |
| 74 | +to read on GitHub as well as in various git tools. |
| 75 | + |
| 76 | +The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any. |
| 77 | + |
| 78 | +Samples: (even more [samples](https://github.com/angular/angular/commits/master)) |
| 79 | + |
| 80 | +``` |
| 81 | +docs(changelog): update changelog to beta.5 |
| 82 | +``` |
| 83 | + |
| 84 | +``` |
| 85 | +fix(release): need to depend on latest rxjs and zone.js |
| 86 | +
|
| 87 | +The version in our package.json gets copied to the one we publish, and users need the latest of these. |
| 88 | +``` |
0 commit comments