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

Commit fd98c64

Browse files
merge
2 parents 02a43aa + 2a1f608 commit fd98c64

File tree

167 files changed

+13424
-584
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+13424
-584
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# IDEs and editors
1212
/.idea
13+
*.iml
1314
.project
1415
.classpath
1516
.c9/

.travis.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ before_install:
2424
script:
2525
- if [ -n "DANGER_GITHUB_API_TOKEN" ]; then echo {} > ./.babelrc && npx danger; fi
2626
- ng lint
27-
- ng test --single-run
28-
- ng build -prod
27+
- ng test --single-run --code-coverage
28+
- ng build --prod
2929
- ng e2e
30+
31+
before_deploy:
32+
- rm -rf ./dist
33+
- ng build
34+
- yes | rm *.* && rm -rf ./e2e ./node_modules ./src
35+
- cp -r ./dist/* ./
36+
37+
deploy:
38+
provider: azure_web_apps
39+
verbose: true
40+
skip_cleanup: true
41+
42+
after_success:
43+
- bash <(curl -s https://codecov.io/bash)

CONTRIBUTING.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
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 add .
57+
npm run commit
58+
```
59+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
60+
61+
* Push your branch to GitHub:
62+
63+
```shell
64+
git push origin my-fix-branch
65+
```
66+
67+
* In GitHub, send a pull request to `rxjs-docs:master`.
68+
* If we suggest changes then:
69+
* Make the required updates.
70+
* Re-run the test suites to ensure tests are still passing.
71+
* Re-run performance tests to make sure your changes didn't hurt performance.
72+
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
73+
74+
```shell
75+
git rebase master -i
76+
git push -f
77+
```
78+
79+
That's it! Thank you for your contribution!
80+
81+
82+
### After your pull request is merged
83+
84+
After your pull request is merged, you can safely delete your branch and pull the changes
85+
from the main (upstream) repository:
86+
87+
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
88+
89+
```shell
90+
git push origin --delete my-fix-branch
91+
```
92+
93+
* Check out the master branch:
94+
95+
```shell
96+
git checkout master -f
97+
```
98+
99+
* Delete the local branch:
100+
101+
```shell
102+
git branch -D my-fix-branch
103+
```
104+
105+
* Update your master with the latest upstream version:
106+
107+
```shell
108+
git pull --ff upstream master
109+
```
110+
111+
112+
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
113+
## Commit Message Guidelines
114+
115+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
116+
readable messages** that are easy to follow when looking through the **project history**. But also,
117+
we use the git commit messages to **generate the rxjs-docs change log**. Helper script `npm run commit`
118+
provides command line based wizard to format commit message easily.
119+
120+
### Commit Message Format
121+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
122+
format that includes a **type**, a **scope** and a **subject**:
123+
124+
```
125+
<type>(<scope>): <subject>
126+
<BLANK LINE>
127+
<body>
128+
<BLANK LINE>
129+
<footer>
130+
```
131+
132+
The **header** is mandatory and the **scope** of the header is optional.
133+
134+
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier
135+
to read on GitHub as well as in various git tools.
136+
137+
### Revert
138+
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.
139+
140+
### Type
141+
Must be one of the following:
142+
143+
* **feat**: A new feature
144+
* **fix**: A bug fix
145+
* **docs**: Documentation only changes
146+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
147+
semi-colons, etc)
148+
* **refactor**: A code change that neither fixes a bug nor adds a feature
149+
* **perf**: A code change that improves performance
150+
* **test**: Adding missing tests
151+
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
152+
generation
153+
154+
### Scope
155+
The scope could be anything specifying place of the commit change. For example
156+
`Observable`, `Subject`, `switchMap`, etc.
157+
158+
### Subject
159+
The subject contains succinct description of the change:
160+
161+
* use the imperative, present tense: "change" not "changed" nor "changes"
162+
* don't capitalize first letter
163+
* no dot (.) at the end
164+
165+
### Body
166+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
167+
The body should include the motivation for the change and contrast this with previous behavior.
168+
169+
### Footer
170+
The footer should contain any information about **Breaking Changes** and is also the place to
171+
reference GitHub issues that this commit **Closes**.
172+
173+
**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

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,42 @@
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
57

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.
8+
[Apache 2.0 License](LICENSE.txt)
9+
- [Code of Conduct](CODE_OF_CONDUCT.md)
10+
- [Contribution Guidelines](CONTRIBUTING.md)
711

8-
## Build
12+
## Important
913

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.
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.
1115

12-
## License
16+
## Goals
1317

14-
License is the same as the RxJS project: https://github.com/reactivex/rxjs
18+
- Serve updated docs for RxJs
19+
- Serve multiple translations for the docs
20+
- Provide working examples
21+
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
35+
36+
## Committing
37+
It is strongly recommended that when creating a commit, you follow this procedure to start the commit wizard. It will aid you on creating valid commit messages.
38+
39+
```shell
40+
git add .
41+
npm run commit
42+
```

dangerfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const fs = require('fs');
22
const path = require('path');
33
const validateMessage = require('validate-commit-msg');
4+
const _ = require('lodash');
45

56
let errorCount = 0;
67

@@ -38,6 +39,6 @@ const messageConventionValid = danger.git.commits.reduce(function (acc, value) {
3839
}, true);
3940

4041
if (!messageConventionValid) {
41-
warn('commit message does not follows conventional change log (' + ++errorCount + ')');
42+
fail('commit message does not follows conventional change log (' + ++errorCount + ')');
4243
markdown('> (' + errorCount + ') : RxJS uses conventional change log to generate changelog automatically. It seems some of commit messages are not following those, please check [contributing guideline](https://github.com/ReactiveX/rxjs/blob/master/CONTRIBUTING.md#commit-message-format) and update commit messages.');
4344
}

ngsw-manifest.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
"external": {
33
"urls": [
44
{"url": "https://fonts.googleapis.com/icon?family=Material+Icons"},
5-
{"url": "https://fonts.googleapis.com/css?family=Roboto"},
5+
{"url": "https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700"},
66
{"url": "https://ajax.googleapis.com/ajax/libs/hammerjs/2.0.8/hammer.min.js"},
7-
{"url": "https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.2.5/web-animations.min.js"}
7+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.2.5/web-animations.min.js"},
8+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/monokai_sublime.min.css"},
9+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min.js"},
10+
{"url": "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/languages/typescript.min.js"},
11+
{"url": "http://reactivex.io/rxjs/img/combineAll.png"},
12+
{"url": "http://reactivex.io/rxjs/img/combineLatest.png"}
813
]
914
}
1015
}

package.json

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,68 @@
22
"name": "rxjs-docs",
33
"version": "0.0.0",
44
"license": "MIT",
5+
"config": {
6+
"commitizen": {
7+
"path": "cz-conventional-changelog"
8+
}
9+
},
10+
"lint-staged": {
11+
"*.@(ts)": [
12+
"prettier --single-quote --parser typescript --write",
13+
"tslint --fix",
14+
"git add"
15+
]
16+
},
517
"scripts": {
618
"ng": "ng",
719
"start": "ng serve",
820
"build": "ng build",
921
"build-prod": "ng build --prod",
1022
"test": "ng test",
1123
"lint": "ng lint",
12-
"e2e": "ng e2e"
24+
"e2e": "ng e2e",
25+
"commit": "git-cz",
26+
"precommit": "lint-staged"
1327
},
1428
"private": true,
1529
"dependencies": {
16-
"@angular/animations": "4.4.4",
17-
"@angular/cdk": "2.0.0-beta.12",
18-
"@angular/common": "4.4.4",
19-
"@angular/compiler": "4.4.4",
20-
"@angular/core": "4.4.4",
21-
"@angular/forms": "4.4.4",
22-
"@angular/http": "4.4.4",
23-
"@angular/material": "2.0.0-beta.12",
24-
"@angular/platform-browser": "4.4.4",
25-
"@angular/platform-browser-dynamic": "4.4.4",
26-
"@angular/router": "4.4.4",
30+
"@angular/animations": "5.0.2",
31+
"@angular/cdk": "5.0.0-rc0",
32+
"@angular/common": "5.0.2",
33+
"@angular/compiler": "5.0.2",
34+
"@angular/core": "5.0.2",
35+
"@angular/flex-layout": "2.0.0-beta.10",
36+
"@angular/forms": "5.0.2",
37+
"@angular/http": "5.0.2",
38+
"@angular/material": "5.0.0-rc0",
39+
"@angular/platform-browser": "5.0.2",
40+
"@angular/platform-browser-dynamic": "5.0.2",
41+
"@angular/router": "5.0.2",
2742
"@types/hammerjs": "2.0.35",
2843
"core-js": "2.4.1",
2944
"font-awesome": "4.7.0",
3045
"hammerjs": "2.0.8",
31-
"rxjs": "5.4.2",
46+
"rxjs": "5.5.2",
47+
"ts-loader": "3.1.1",
3248
"zone.js": "0.8.14"
3349
},
3450
"devDependencies": {
35-
"@angular/cli": "1.4.5",
36-
"@angular/compiler-cli": "4.4.4",
37-
"@angular/language-service": "4.4.4",
51+
"@angular/cli": "1.5.2",
52+
"@angular/compiler-cli": "5.0.2",
53+
"@angular/language-service": "5.0.2",
3854
"@angular/service-worker": "1.0.0-beta.16",
3955
"@types/jasmine": "2.5.53",
4056
"@types/jasminewd2": "2.0.2",
4157
"@types/lodash": "4.14.77",
4258
"@types/node": "6.0.60",
4359
"angular2-template-loader": "0.6.2",
4460
"codelyzer": "3.1.1",
61+
"commitizen": "^2.9.6",
62+
"cz-conventional-changelog": "^2.0.0",
4563
"danger": "1.2.0",
64+
"doctoc": "^1.3.0",
4665
"electron": "1.6.11",
66+
"husky": "0.14.3",
4767
"jasmine-core": "2.6.2",
4868
"jasmine-spec-reporter": "4.1.0",
4969
"karma": "1.7.0",
@@ -52,12 +72,18 @@
5272
"karma-coverage-istanbul-reporter": "1.2.1",
5373
"karma-jasmine": "1.1.0",
5474
"karma-jasmine-html-reporter": "0.2.2",
75+
"lint-staged": "4.3.0",
5576
"lodash": "4.17.4",
77+
"prettier": "1.7.4",
5678
"protractor": "5.1.2",
5779
"ts-node": "3.2.0",
5880
"tslint": "5.3.2",
59-
"typescript": "2.3.3",
81+
"tslint-config-prettier": "1.6.0",
82+
"typescript": "2.4.2",
6083
"validate-commit-msg": "2.14.0",
6184
"wallaby-webpack": "*"
85+
},
86+
"engines": {
87+
"npm": ">=2.0.0"
6288
}
6389
}

0 commit comments

Comments
 (0)