Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit aec9e36

Browse files
authored
Merge pull request #44 from knittingcodemonkey/addToReadme
docs(README.md, CONTRIBUTING.md): Update and Add respectively
2 parents f5bf6a8 + 7cb3669 commit aec9e36

File tree

4 files changed

+1968
-358
lines changed

4 files changed

+1968
-358
lines changed

CONTRIBUTING.md

+172
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Contributing to RxJS Docs
2+
3+
[Read and abide by the Code of Conduct](CODE_OF_CONDUCT.md)! Even if you don't read it,
4+
it still applies to you. Ignorance is not an exemption.
5+
6+
Contents
7+
8+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
9+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
10+
11+
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
12+
- [After your pull request is merged](#after-your-pull-request-is-merged)
13+
- [Commit Message Guidelines](#commit-message-guidelines)
14+
- [Commit Message Format](#commit-message-format)
15+
- [Revert](#revert)
16+
- [Type](#type)
17+
- [Scope](#scope)
18+
- [Subject](#subject)
19+
- [Body](#body)
20+
- [Footer](#footer)
21+
22+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
23+
24+
(This document is a work and progress and is subject to change)
25+
26+
## Building/Testing
27+
28+
The build and test structure is fairly primitive at the moment. There are various npm scripts that can be run:
29+
30+
- start: runs the dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
31+
- test: runs tests with `jasmine`, must have built prior to running.
32+
- build: build artifacts will be stored in the `dist/` directory
33+
- build-prod: builds for production using the `--prod` flag
34+
- commit: runs git commit wizard for passing rxjs-github-bot message validator
35+
36+
## Submitting a Pull Request (PR)
37+
Before you submit your Pull Request (PR) consider the following guidelines:
38+
39+
* Search [GitHub](https://github.com/ReactiveX/rxjs-docs/pulls) for an open or closed PR
40+
that relates to your submission. You don't want to duplicate effort.
41+
* Make your changes in a new git branch:
42+
43+
```shell
44+
git checkout -b my-fix-branch master
45+
```
46+
47+
* Create your patch, following [code style guidelines](#coding-style-guidelines), and **including appropriate test cases**.
48+
* Run the full test suite and ensure that all tests pass.
49+
* Run the micro and macro performance tests against your feature branch and compare against master
50+
to ensure performance wasn't changed for the worse.
51+
* Commit your changes using a descriptive commit message that follows our
52+
[commit message guidelines](#commit-message-guidelines). Adherence to these conventions
53+
is necessary because release notes are automatically generated from these messages.
54+
55+
```shell
56+
git commit -a
57+
```
58+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
59+
60+
* Push your branch to GitHub:
61+
62+
```shell
63+
git push origin my-fix-branch
64+
```
65+
66+
* In GitHub, send a pull request to `rxjs-docs:master`.
67+
* If we suggest changes then:
68+
* Make the required updates.
69+
* Re-run the test suites to ensure tests are still passing.
70+
* Re-run performance tests to make sure your changes didn't hurt performance.
71+
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
72+
73+
```shell
74+
git rebase master -i
75+
git push -f
76+
```
77+
78+
That's it! Thank you for your contribution!
79+
80+
81+
### After your pull request is merged
82+
83+
After your pull request is merged, you can safely delete your branch and pull the changes
84+
from the main (upstream) repository:
85+
86+
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
87+
88+
```shell
89+
git push origin --delete my-fix-branch
90+
```
91+
92+
* Check out the master branch:
93+
94+
```shell
95+
git checkout master -f
96+
```
97+
98+
* Delete the local branch:
99+
100+
```shell
101+
git branch -D my-fix-branch
102+
```
103+
104+
* Update your master with the latest upstream version:
105+
106+
```shell
107+
git pull --ff upstream master
108+
```
109+
110+
111+
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
112+
## Commit Message Guidelines
113+
114+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
115+
readable messages** that are easy to follow when looking through the **project history**. But also,
116+
we use the git commit messages to **generate the rxjs-docs change log**. Helper script `npm run commit`
117+
provides command line based wizard to format commit message easily.
118+
119+
### Commit Message Format
120+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
121+
format that includes a **type**, a **scope** and a **subject**:
122+
123+
```
124+
<type>(<scope>): <subject>
125+
<BLANK LINE>
126+
<body>
127+
<BLANK LINE>
128+
<footer>
129+
```
130+
131+
The **header** is mandatory and the **scope** of the header is optional.
132+
133+
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier
134+
to read on GitHub as well as in various git tools.
135+
136+
### Revert
137+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
138+
139+
### Type
140+
Must be one of the following:
141+
142+
* **feat**: A new feature
143+
* **fix**: A bug fix
144+
* **docs**: Documentation only changes
145+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
146+
semi-colons, etc)
147+
* **refactor**: A code change that neither fixes a bug nor adds a feature
148+
* **perf**: A code change that improves performance
149+
* **test**: Adding missing tests
150+
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
151+
generation
152+
153+
### Scope
154+
The scope could be anything specifying place of the commit change. For example
155+
`Observable`, `Subject`, `switchMap`, etc.
156+
157+
### Subject
158+
The subject contains succinct description of the change:
159+
160+
* use the imperative, present tense: "change" not "changed" nor "changes"
161+
* don't capitalize first letter
162+
* no dot (.) at the end
163+
164+
### Body
165+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
166+
The body should include the motivation for the change and contrast this with previous behavior.
167+
168+
### Footer
169+
The footer should contain any information about **Breaking Changes** and is also the place to
170+
reference GitHub issues that this commit **Closes**.
171+
172+
**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.

README.md

+26-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
1+
[![Build Status](https://travis-ci.org/ReactiveX/rxjs-docs.svg?branch=master)](https://travis-ci.org/ReactiveX/rxjs-docs)
2+
13
# rxjs-docs
24
The home for new work on the new RxJS docs (RxJS v5 and up)
35

4-
## Development server
6+
License is the same as the RxJS project: https://github.com/reactivex/rxjs
7+
8+
[Apache 2.0 License](LICENSE.txt)
9+
- [Code of Conduct](CODE_OF_CONDUCT.md)
10+
- [Contribution Guidelines](CONTRIBUTING.md)
511

6-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
12+
## Important
713

8-
## Build
14+
By contributing or commenting on issues in this repository, whether you've read them or not, you're agreeing to the [Contributor Code of Conduct](CODE_OF_CONDUCT.md). Much like traffic laws, ignorance doesn't grant you immunity.
915

10-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
16+
## Goals
1117

12-
## License
18+
- Serve updated docs for RxJs
19+
- Serve multiple translations for the docs
20+
- Provide working examples
1321

14-
License is the same as the RxJS project: https://github.com/reactivex/rxjs
22+
## Contributing
23+
24+
More detailed information can be found in the [Contribution Guidelines](CONTRIBUTING.md)
25+
26+
## Building/Testing
27+
28+
The build and test structure is fairly primitive at the moment. There are various npm scripts that can be run:
29+
30+
- start: runs the dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
31+
- test: runs tests with `jasmine`, must have built prior to running.
32+
- build: build artifacts will be stored in the `dist/` directory
33+
- build-prod: builds for production using the `--prod` flag
34+
- commit: runs git commit wizard for passing rxjs-github-bot message validator

package.json

+13-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22
"name": "rxjs-docs",
33
"version": "0.0.0",
44
"license": "MIT",
5+
"config": {
6+
"commitizen": {
7+
"path": "cz-conventional-changelog"
8+
}
9+
},
510
"scripts": {
611
"ng": "ng",
712
"start": "ng serve",
813
"build": "ng build",
914
"build-prod": "ng build --prod",
1015
"test": "ng test",
1116
"lint": "ng lint",
12-
"e2e": "ng e2e"
17+
"e2e": "ng e2e",
18+
"commit": "git-cz"
1319
},
1420
"private": true,
1521
"dependencies": {
@@ -41,7 +47,10 @@
4147
"@types/node": "6.0.60",
4248
"angular2-template-loader": "0.6.2",
4349
"codelyzer": "3.1.1",
50+
"commitizen": "^2.9.6",
51+
"cz-conventional-changelog": "^2.0.0",
4452
"danger": "1.2.0",
53+
"doctoc": "^1.3.0",
4554
"electron": "1.6.11",
4655
"jasmine-core": "2.6.2",
4756
"jasmine-spec-reporter": "4.1.0",
@@ -58,5 +67,8 @@
5867
"typescript": "2.3.3",
5968
"validate-commit-msg": "2.14.0",
6069
"wallaby-webpack": "*"
70+
},
71+
"engines": {
72+
"npm": ">=2.0.0"
6173
}
6274
}

0 commit comments

Comments
 (0)