diff --git a/doc/asset/Rx_Logo_S.png b/doc/asset/Rx_Logo_S.png new file mode 100644 index 0000000000..b4066e8a9b Binary files /dev/null and b/doc/asset/Rx_Logo_S.png differ diff --git a/doc/index.md b/doc/index.md index 4c014b27bf..0e3c1452f0 100644 --- a/doc/index.md +++ b/doc/index.md @@ -1,97 +1,12 @@ -# Observable +

RxJS

-## creation functions +**The ReactiveX library for JavaScript.** -- [combineLatest](function/index.html#static-function-combineLatest) -- [concat](function/index.html#static-function-concat) -- [create](function/index.html#static-function-create) -- [defer](function/index.html#static-function-defer) -- [empty](function/index.html#static-function-empty) -- [forkJoin](function/index.html#static-function-forkJoin) -- [from](function/index.html#static-function-from) -- [fromArray](function/index.html#static-function-fromArray) -- [fromEvent](function/index.html#static-function-fromEvent) -- [fromEventPattern](function/index.html#static-function-fromEventPattern) -- [fromPromise](function/index.html#static-function-fromPromise) -- [interval](function/index.html#static-function-interval) -- [merge](function/index.html#static-function-merge) -- [never](function/index.html#static-function-never) -- [of](function/index.html#static-function-of) -- [race](function/index.html#static-function-race) -- [range](function/index.html#static-function-range) -- [throw](function/index.html#static-function-throw) -- [timer](function/index.html#static-function-timer) -- [zip](function/index.html#static-function-zip) +This is a rewrite of [Reactive-Extensions/RxJS](https://github.com/Reactive-Extensions/RxJS) and is intended to supersede it once this is ready. This version's purpose is to have better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface. -## operators - -- [buffer](function/index.html#static-function-buffer) -- [bufferCount](function/index.html#static-function-bufferCount) -- [bufferTime](function/index.html#static-function-bufferTime) -- [bufferToggle](function/index.html#static-function-bufferToggle) -- [bufferWhen](function/index.html#static-function-bufferWhen) -- [catch](function/index.html#static-function-catch) -- [combineAll](function/index.html#static-function-combineAll) -- [combineLatest](function/index.html#static-function-combineLatest) -- [concat](function/index.html#static-function-concat) -- [concatAll](function/index.html#static-function-concatAll) -- [concatMap](function/index.html#static-function-concatMap) -- [concatMapTo](function/index.html#static-function-concatMapTo) -- [count](function/index.html#static-function-count) -- [debounce](function/index.html#static-function-debounce) -- [defaultIfEmpty](function/index.html#static-function-defaultIfEmpty) -- [delay](function/index.html#static-function-delay) -- [distinct](function/index.html#static-function-distinct) -- [distinctKey](function/index.html#static-function-distinctKey) -- [distinctUntilChanged](function/index.html#static-function-distinctUntilChanged) -- [distinctUntilKeyChanged](function/index.html#static-function-distinctUntilKeyChanged) -- [do](function/index.html#static-function-do) -- [expand](function/index.html#static-function-expand) -- [filter](function/index.html#static-function-filter) -- [finally](function/index.html#static-function-finally) -- [mergeMap](function/index.html#static-function-mergeMap) -- [mergeMapTo](function/index.html#static-function-mergeMapTo) -- [groupBy](function/index.html#static-function-groupBy) -- [lift](function/index.html#static-function-lift) -- [map](function/index.html#static-function-map) -- [mapTo](function/index.html#static-function-mapTo) -- [materialize](function/index.html#static-function-materialize) -- [merge](function/index.html#static-function-merge) -- [mergeAll](function/index.html#static-function-mergeAll) -- [multicast](function/index.html#static-function-multicast) -- [observeOn](function/index.html#static-function-observeOn) -- [pairwise](function/index.html#static-function-pairwise) -- [partition](function/index.html#static-function-partition) -- [publish](function/index.html#static-function-publish) -- [publishBehavior](function/index.html#static-function-publishBehavior) -- [publishReplay](function/index.html#static-function-publishReplay) -- [race](function/index.html#static-function-race) -- [reduce](function/index.html#static-function-reduce) -- [repeat](function/index.html#static-function-repeat) -- [retry](function/index.html#static-function-retry) -- [retryWhen](function/index.html#static-function-retryWhen) -- [sample](function/index.html#static-function-sample) -- [sampleTime](function/index.html#static-function-sampleTime) -- [scan](function/index.html#static-function-scan) -- [skip](function/index.html#static-function-skip) -- [skipUntil](function/index.html#static-function-skipUntil) -- [startWith](function/index.html#static-function-startWith) -- [subscribeOn](function/index.html#static-function-subscribeOn) -- [switch](function/index.html#static-function-switch) -- [switchMap](function/index.html#static-function-switchMap) -- [switchMapTo](function/index.html#static-function-switchMapTo) -- [take](function/index.html#static-function-take) -- [takeUntil](function/index.html#static-function-takeUntil) -- [throttle](function/index.html#static-function-throttle) -- [timeout](function/index.html#static-function-timeout) -- [timeoutWith](function/index.html#static-function-timeoutWith) -- [toArray](function/index.html#static-function-toArray) -- [toPromise](function/index.html#static-function-toPromise) -- [window](function/index.html#static-function-window) -- [windowCount](function/index.html#static-function-windowCount) -- [windowTime](function/index.html#static-function-windowTime) -- [windowToggle](function/index.html#static-function-windowToggle) -- [windowWhen](function/index.html#static-function-windowWhen) -- [withLatestFrom](function/index.html#static-function-withLatestFrom) -- [zip](function/index.html#static-function-zip) -- [zipAll](function/index.html#static-function-zipAll) +### [» Install it](./manual/installation.html) +*How to install RxJS through npm or CDN* +### [» Learn it](./manual/overview.html) +*Read the Manual on Observables, Observer, Subject, etc* +### [» Full reference](./identifiers.html) +*Read detailed documentation on each operator* diff --git a/doc/installation.md b/doc/installation.md new file mode 100644 index 0000000000..218f24443e --- /dev/null +++ b/doc/installation.md @@ -0,0 +1,87 @@ +## ES6 via npm + +```sh +npm install rxjs-es +``` + +To import the entire core set of functionality: + +```js +import Rx from 'rxjs/Rx'; + +Rx.Observable.of(1,2,3) +``` + +To import only what you need by patching (this is useful for size-sensitive bundling): + +```js +import {Observable} from 'rxjs/Observable'; +import 'rxjs/add/operator/map'; + +Observable.of(1,2,3).map(x => x + '!!!'); // etc +``` + +To import what you need and use it with ES next function bind (best overall method, if possible): + +```js +import {Observable} from 'rxjs/Observable'; +import {map} from 'rxjs/operator/map'; + +Observable.of(1,2,3)::map(x => x + '!!!'); // etc +``` + +## CommonJS via npm + +```sh +npm install rxjs +``` + +Import all core functionality: + +```js +var Rx = require('rxjs/Rx'); + +Rx.Observable.of(1,2,3); // etc +``` + +Import only what you need and patch Observable (this is useful in size-sensitive bundling scenarios): + +```js +var Observable = require('rxjs/Observable').Observable; +// patch Observable with appropriate methods +require('rxjs/add/operator/map'); + +Observable.of(1,2,3).map(function (x) { return x + '!!!'; }); // etc +``` + +Import operators and use them _manually_ you can do the following (this is also useful for bundling): + +```js +var Observable = require('rxjs/Observable').Observable; +var map = require('rxjs/operator/map').map; + +map.call(Observable.of(1,2,3), function (x) { return x + '!!!'; }); +``` + +You can also use the above method to build your own Observable and export it from your own module. + +## All Module Types (CJS/ES6/AMD/TypeScript) via npm + +To install this library via [npm](https://www.npmjs.org) **version 3**, use the following command: + +```sh +npm install @reactivex/rxjs +``` + +If you are using npm **version 2** before this library has achieved a stable version, you need to specify the library version explicitly: + +```sh +npm install @reactivex/rxjs@5.0.0-beta.1 +``` + +## CDN + +For CDN, you can use [npmcdn](https://npmcdn.com). Just replace `version` with the current +version on the link below: + +https://npmcdn.com/@reactivex/rxjs@version/dist/global/Rx.umd.js diff --git a/doc/introduction.md b/doc/introduction.md new file mode 100644 index 0000000000..60d5ec1bcc --- /dev/null +++ b/doc/introduction.md @@ -0,0 +1,5 @@ +# Introduction + +RxJS is a library for composing asynchronous and event-based programs by using observable sequences. + +TODO diff --git a/doc/observable.md b/doc/observable.md new file mode 100644 index 0000000000..142d9bfb28 --- /dev/null +++ b/doc/observable.md @@ -0,0 +1,5 @@ +# Observable + +What is an Observable? + +TODO diff --git a/doc/observer.md b/doc/observer.md new file mode 100644 index 0000000000..8792f593c0 --- /dev/null +++ b/doc/observer.md @@ -0,0 +1,5 @@ +# Observer + +What is an Observer? + +TODO diff --git a/doc/operators.md b/doc/operators.md new file mode 100644 index 0000000000..e399491054 --- /dev/null +++ b/doc/operators.md @@ -0,0 +1,5 @@ +# Operators + +What are operators? + +TODO diff --git a/doc/scheduler.md b/doc/scheduler.md new file mode 100644 index 0000000000..944d44408f --- /dev/null +++ b/doc/scheduler.md @@ -0,0 +1,5 @@ +# Scheduler + +What is a Scheduler? + +TODO diff --git a/doc/styles/main.css b/doc/styles/main.css new file mode 100644 index 0000000000..963c0b8c23 --- /dev/null +++ b/doc/styles/main.css @@ -0,0 +1,85 @@ +/* Colors: +@reactivex-pink: #EC0C8E; +@reactivex-pinkle:#B7178C; +@reactivex-purple:#592D89; +@reactivex-blue: #3c71c4; +@reactivex-grass: #20993c; +@reactivex-green: #26de5a; +@reactivex-yellow:#ffcb47; +@reactivex-red: #de4c28; +*/ + +@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,700); +@import url(https://fonts.googleapis.com/css?family=Signika); + +html { + font-family: 'Source Sans Pro', 'Roboto', sans-serif; + font-size: 16px; +} + +a { + color: #B7178C; +} + +/* Top nav bar border bottom */ +.layout-container > header { + border-bottom: solid 1px #B7178C; +} + +.rx-title { + color: #EC0C8E; + font-family: 'Signika', 'Roboto', sans-serif; +} +.rx-title > img { + box-shadow: none !important; + max-height: 1.3em; + margin-bottom: -0.25em; + margin-right: 0.3em; +} + +.content .detail { + font-size: 16px; +} + +.content .detail + .detail { + margin-top: 75px; +} + +.content .detail p img { + max-width: 640px; +} + +/* Params table styling */ +table.params thead { + background: none; + color: inherit; + font-weight: 600; +} + +table.params ul { + padding: 0; +} + +table.params ul li { + list-style: none; +} + +table.params td { + padding: 4px 8px; +} + +table.params td:first-child { + border-left: none; +} + +table.params td:last-child { + border-right: none; +} + +table.params thead td { + border-top: none; +} + +table.params tbody tr:last-child td { + border-bottom: none; +} diff --git a/doc/subject.md b/doc/subject.md new file mode 100644 index 0000000000..474cc53cb6 --- /dev/null +++ b/doc/subject.md @@ -0,0 +1,5 @@ +# Subject + +What is a Subject? + +TODO diff --git a/doc/subscription.md b/doc/subscription.md new file mode 100644 index 0000000000..70bf86ff0a --- /dev/null +++ b/doc/subscription.md @@ -0,0 +1,5 @@ +# Subscription + +What is a Subscription? + +TODO diff --git a/esdoc.json b/esdoc.json index 2835f56c9b..4c8fc685af 100644 --- a/esdoc.json +++ b/esdoc.json @@ -2,5 +2,22 @@ "source": "./dist/es6", "destination": "./tmp/docs", "undocumentIdentifier": false, - "index": "./doc/index.md" + "title": "RxJS", + "styles": ["./doc/styles/main.css"], + "index": "./doc/index.md", + "manual": { + "asset": "./doc/asset", + "overview": [ + "./doc/introduction.md", + "./doc/observable.md", + "./doc/observer.md", + "./doc/subscription.md", + "./doc/subject.md", + "./doc/operators.md", + "./doc/scheduler.md" + ], + "installation": [ + "./doc/installation.md" + ] + } } \ No newline at end of file diff --git a/package.json b/package.json index 57587d6482..c041df97e1 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "commitizen": "2.5.0", "coveralls": "2.11.6", "cz-conventional-changelog": "1.1.5", - "esdoc": "0.4.3", + "esdoc": "0.4.5", "eslint": "2.2.0", "fs-extra": "0.24.0", "ghooks": "0.3.2",