Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(installation): improve installation page #5197

Merged
merged 1 commit into from Jun 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 15 additions & 14 deletions docs_app/content/guide/installation.md
@@ -1,38 +1,39 @@
# Installation Instructions

Here are different ways you can install RxJs:
Here are different ways you can install RxJS:

## ES6 via npm

```js
npm install rxjs
```

To import the entire core set of functionality:
To import only what you need:

```js
import * as rxjs from 'rxjs';
```ts
import { of } from 'rxjs';
import { map } from 'rxjs/operators';

rxjs.of(1, 2, 3);
of(1, 2, 3).pipe(map(x => x + '!!!')); // etc
```

To import only what you need using pipeable operators:
* See [Pipeable Operators](/guide/v6/pipeable-operators) for more information.

```js
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
To import the entire core set of functionality:

of(1,2,3).pipe(map(x => x + '!!!')); // etc
```ts
import * as rxjs from 'rxjs';

rxjs.of(1, 2, 3);
```
* See [Pipeable Operator Documentation](https://github.com/ReactiveX/rxjs/blob/91088dae1df097be2370c73300ffa11b27fd0100/doc/pipeable-operators.md) for more information about pipeable operator.

To use with globally imported bundle:
To use with a globally imported bundle:

```js
const { of } = rxjs;
const { map } = rxjs.operators;

of(1,2,3).pipe(map(x => x + '!!!')); // etc
of(1, 2, 3).pipe(map(x => x + '!!!')); // etc
```

## CommonJS via npm
Expand Down Expand Up @@ -65,7 +66,7 @@ npm install @reactivex/rxjs@5.0.0-beta.1

## CDN

For CDN, you can use [unpkg](https://unpkg.com/). Just replace version with the current version on the link below:
For CDN, you can use [unpkg](https://unpkg.com/). Just replace *version* with the current version on the link below:

For RxJS 5.0.0-beta.1 through beta.11: [https://unpkg.com/@reactivex/rxjs@version/dist/global/Rx.umd.js](https://unpkg.com/@reactivex/rxjs@version/dist/global/Rx.umd.js)

Expand Down