Skip to content

Adding yarn option #9137

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

Merged
merged 3 commits into from Jan 3, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,49 @@ For existing apps, follow these steps to begin using Angular Material.

### Step 1: Install Angular Material and Angular CDK

You can use either the npm or yarn command-line tool to install packages. Use whichever is appropriate for your project in the examples below.

#### NPM
```bash
npm install --save @angular/material @angular/cdk
```
#### Yarn
```bash
yarn add @angular/material @angular/cdk
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs something that clearly conveys it would be one or the other, not both.

Copy link
Author

@ghost ghost Jan 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jelbourn something like

We have added install scripts so you can pick between npm or yarn

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right under "Step 1", it should say

"You can use either the npm or yarn command-line tool to install packages. Use whichever is appropriate for your project in the examples below."

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jelbourn added it 👍


#### Alternative: Snapshot Build

A snapshot build with the latest changes from master is also available. Note that this snapshot
build should not be considered stable and may break between releases.

#### NPM
```bash
npm install --save angular/material2-builds angular/cdk-builds
```

#### Yarn
```bash
yarn add angular/material2-builds angular/cdk-builds
```

### Step 2: Animations

Some Material components depend on the Angular animations module in order to be able to do
more advanced transitions. If you want these animations to work in your app, you have to
install the `@angular/animations` module and include the `BrowserAnimationsModule` in your app.

#### NPM
```bash
npm install --save @angular/animations
```

#### Yarn
```bash
yarn install @angular/animations
```

**Note:** `@angular/animations` uses the WebAnimation API that isn't supported by all browsers yet.
If you want to support Material component animations in these browsers, you'll have to
[include a polyfill](https://github.com/web-animations/web-animations-js).
Expand Down