Skip to content

Commit d917b05

Browse files
chore: add CONTRIBUTING.md document (#85)
1 parent 901f695 commit d917b05

File tree

1 file changed

+134
-0
lines changed

1 file changed

+134
-0
lines changed

CONTRIBUTING.md

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Contributing
2+
3+
Thank you in advance for contributing your time and effort to this project! The instructions for contributing to the project are listed below.
4+
5+
## Setup
6+
7+
```shell
8+
yarn
9+
```
10+
11+
## Running Unit Tests
12+
13+
```shell
14+
yarn test
15+
```
16+
17+
## Running E2E Tests
18+
19+
```shell
20+
yarn affected:e2e
21+
```
22+
23+
## Building the library
24+
25+
```shell
26+
yarn build
27+
```
28+
29+
## Submitting Pull Requests
30+
31+
**Please follow these steps to simplify pull request reviews.**
32+
33+
- Please rebase your branch against the current `master` branch.
34+
- Run the `Setup` command to make sure your development dependencies are up-to-date.
35+
- Please ensure the test suite passes before submitting a PR.
36+
- If you've added new functionality, **please** include tests which validate its behavior.
37+
- Make reference to possible [issues](https://github.com/angular-component/router/issues) on PR comment.
38+
39+
## Submitting bug reports
40+
41+
- Search through issues to see if a previous issue has already been reported and/or fixed.
42+
- Provide a _small_ reproduction.
43+
- Please detail the affected browser(s) and operating system(s).
44+
- Please be sure to state which version of Angular, node and npm you're using.
45+
46+
## Submitting new features
47+
48+
- We value keeping the API surface small and concise, which factors into whether new features are accepted.
49+
- Submit an issue with the prefix `RFC:` with your feature request.
50+
- The feature will be discussed and considered.
51+
- Once the PR is submitted, it will be reviewed and merged once approved.
52+
53+
## <a name="commit"></a> Commit Message Guidelines
54+
55+
We use conventional commit messages, and use the git commit messages to **generate the changelog**.
56+
57+
### Commit Message Format
58+
59+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
60+
format that includes a **type**, a **scope** and a **subject**:
61+
62+
```
63+
<type>(<scope>): <subject>
64+
<BLANK LINE>
65+
<body>
66+
<BLANK LINE>
67+
<footer>
68+
```
69+
70+
The **header** is mandatory and the **scope** of the header is optional.
71+
72+
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
73+
74+
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
75+
76+
```
77+
docs: update changelog to beta.5
78+
```
79+
80+
```
81+
fix: update router component to fix issue with rendering
82+
```
83+
84+
### Type
85+
86+
Must be one of the following:
87+
88+
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
89+
- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
90+
- **docs**: Documentation only changes
91+
- **feat**: A new feature
92+
- **fix**: A bug fix
93+
- **perf**: A code change that improves performance
94+
- **refactor**: A code change that neither fixes a bug nor adds a feature
95+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
96+
- **test**: Adding missing tests or correcting existing tests
97+
98+
### Subject
99+
100+
The subject contains a succinct description of the change:
101+
102+
- use the imperative, present tense: "change" not "changed" nor "changes"
103+
- don't capitalize the first letter
104+
- no dot (.) at the end
105+
106+
### Body
107+
108+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
109+
110+
### Footer
111+
112+
The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**.
113+
114+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
115+
116+
Example:
117+
118+
```
119+
feat: commit message
120+
121+
Closes #issuenumber
122+
123+
BREAKING CHANGES:
124+
125+
Describe breaking changes here
126+
127+
BEFORE:
128+
129+
Previous code example here
130+
131+
AFTER:
132+
133+
New code example here
134+
```

0 commit comments

Comments
 (0)