Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1dedcdf

Browse files
docs(*): switch from npm to yarn
1 parent 05c3336 commit 1dedcdf

File tree

10 files changed

+44
-34
lines changed

10 files changed

+44
-34
lines changed

CONTRIBUTING.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ We have very precise rules over how our git commit messages can be formatted. T
209209
readable messages** that are easy to follow when looking through the **project history**. But also,
210210
we use the git commit messages to **generate the AngularJS change log**.
211211

212-
The commit message formatting can be added using a typical git workflow or through the use of a CLI wizard ([Commitizen](https://github.com/commitizen/cz-cli)). To use the wizard, run `npm run commit` in your terminal after staging your changes in git.
212+
The commit message formatting can be added using a typical git workflow or through the use of a CLI
213+
wizard ([Commitizen](https://github.com/commitizen/cz-cli)). To use the wizard, run `yarn run commit`
214+
in your terminal after staging your changes in git.
213215

214216
### Commit Message Format
215217
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
@@ -229,7 +231,8 @@ Any line of the commit message cannot be longer 100 characters! This allows the
229231
to read on GitHub as well as in various git tools.
230232

231233
### Revert
232-
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.
234+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
235+
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
233236

234237
### Type
235238
Must be one of the following:
@@ -266,7 +269,8 @@ The body should include the motivation for the change and contrast this with pre
266269
The footer should contain any information about **Breaking Changes** and is also the place to
267270
[reference GitHub issues that this commit closes][closing-issues].
268271
269-
**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.
272+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.
273+
The rest of the commit message is then used for this.
270274
271275
A detailed explanation can be found in this [document][commit-message-format].
272276

TRIAGING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ You can mention him in the relevant thread like this: `@btford`.
9595

9696
> Thanks for submitting this issue!
9797
> Unfortunately, we don't think this functionality belongs in core.
98-
> The good news is that you could easily implement this as a third-party module and publish it on Bower and/or npm.
98+
> The good news is that you could easily implement this as a third-party module and publish it on Bower and/or to the npm repository.
9999
100100

101101
## Assigning Work

docs/config/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var packagePath = __dirname;
66
var Package = require('dgeni').Package;
77

88
// Create and export a new Dgeni package called angularjs. This package depends upon
9-
// the ngdoc, nunjucks, and examples packages defined in the dgeni-packages npm module.
9+
// the ngdoc, nunjucks, and examples packages defined in the dgeni-packages node module.
1010
module.exports = new Package('angularjs', [
1111
require('dgeni-packages/ngdoc'),
1212
require('dgeni-packages/nunjucks'),

docs/config/services/getVersion.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var path = require('canonical-path');
44
/**
55
* dgService getVersion
66
* @description
7-
* Find the current version of the bower component (or npm module)
7+
* Find the current version of the bower component (or node module)
88
*/
99
module.exports = function getVersion(readFilesProcessor) {
1010
var basePath = readFilesProcessor.basePath;

docs/config/templates/ngdoc/api/module.template.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ <h2>Installation</h2>
2121
</li>
2222
<li>
2323
<a href="https://www.npmjs.com/">NPM</a> e.g.
24-
{% code %}npm install {$ doc.packageName $}@X.Y.Z{% endcode %}
24+
{% code %}npm install --save {$ doc.packageName $}@X.Y.Z{% endcode %}
25+
or
26+
{% code %}yarn add {$ doc.packageName $}@X.Y.Z{% endcode %}
2527
</li>
2628
<li>
2729
<a href="http://bower.io">Bower</a> e.g.

docs/content/guide/component-router.ngdoc

+5-6
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ You can see the complete application running below.
149149
<h1 class="title">Component Router</h1>
150150
<app></app>
151151

152-
<!-- Load up the router library - normally you might use npm and host it locally -->
152+
<!-- Load up the router library - normally you might use npm/yarn and host it locally -->
153153
<script src="https://unpkg.com/@angular/[email protected]/angular1/angular_1_router.js"></script>
154154
</file>
155155

@@ -467,13 +467,12 @@ to display list and detail views of Heroes and Crises.
467467

468468
## Install the libraries
469469

470-
It is easier to use npm to install the **Component Router** module. For this guide we will also install
471-
AngularJS itself via npm:
470+
It is easier to use [yarn](https://yarnpkg.com) to install the **Component Router** module.
471+
For this guide we will also install AngularJS itself via yarn:
472472

473473
```bash
474-
npm init
475-
npm install [email protected] --save
476-
npm install @angular/[email protected] --save
474+
yarn init
475+
477476
```
478477

479478

docs/content/guide/unit-testing.ngdoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Karma to run against a number of browsers, which is useful for being confident t
5959
works on all browsers you need to support. Karma is executed on the command line and will display
6060
the results of your tests on the command line once they have run in the browser.
6161

62-
Karma is a NodeJS application, and should be installed through npm. Full installation instructions
62+
Karma is a NodeJS application, and should be installed through npm/yarn. Full installation instructions
6363
are available on [the Karma website](http://karma-runner.github.io/0.12/intro/installation.html).
6464

6565
### Jasmine
@@ -461,7 +461,7 @@ describe("Deep Thought", function() {
461461
}));
462462

463463
it("has calculated the answer correctly", inject(function(DeepThought) {
464-
// Because of sharedInjector, we have access to the instance of the DeepThought service
464+
// Because of sharedInjector, we have access to the instance of the DeepThought service
465465
// that was provided to the beforeAll() hook. Therefore we can test the generated answer
466466
expect(DeepThought.answer).toBe(42);
467467
}));

docs/content/misc/contribute.ngdoc

+21-17
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Building and Testing AngularJS
66

77
This document describes how to set up your development environment to build and test AngularJS, and
8-
explains the basic mechanics of using `git`, `node`, `npm`, `grunt`, and `bower`.
8+
explains the basic mechanics of using `git`, `node`, `yarn`, `grunt`, and `bower`.
99

1010
See the [contributing guidelines](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md)
1111
for how to contribute your own code to AngularJS.
@@ -24,20 +24,27 @@ Before you can build AngularJS, you must install and configure the following dep
2424
machine:
2525

2626
* [Git](http://git-scm.com/): The [Github Guide to
27-
Installing Git](https://help.github.com/articles/set-up-git) is a good source of information.
27+
Installing Git](https://help.github.com/articles/set-up-git) is a good source of information.
2828

29-
* [Node.js v4.x](http://nodejs.org): We use Node to generate the documentation, run a
30-
development web server, run tests, and generate distributable files. Depending on your system, you can install Node either from source or as a
31-
pre-packaged bundle. (Currently our build does not work properly on Node v5 or greater - please use v4.x.)
29+
* [Node.js v6.x (LTS)](http://nodejs.org): We use Node to generate the documentation, run a
30+
development web server, run tests, and generate distributable files. Depending on your system,
31+
you can install Node either from source or as a pre-packaged bundle.
32+
33+
We recommend using [nvm](https://github.com/creationix/nvm) to manage and install Node.js,
34+
which makes it easy to change the version of Node.js per project.
35+
36+
* [Yarn](https://yarnpkg.com): We use Yarn to install our Node.js module dependencies (rather than using npm).
37+
There are detailed installation instructions available at https://yarnpkg.com/en/docs/install.
3238

3339
* [Java](http://www.java.com): We minify JavaScript using our
34-
[Closure Tools](https://developers.google.com/closure/) jar. Make sure you have Java (version 7 or higher) installed
35-
and included in your [PATH](http://docs.oracle.com/javase/tutorial/essential/environment/paths.html) variable.
40+
[Closure Tools](https://developers.google.com/closure/) jar. Make sure you have Java (version 7 or higher)
41+
installed and included in your [PATH](http://docs.oracle.com/javase/tutorial/essential/environment/paths.html)
42+
variable.
3643

3744
* [Grunt](http://gruntjs.com): We use Grunt as our build system. Install the grunt command-line tool globally with:
3845

3946
```shell
40-
npm install -g grunt-cli
47+
yarn global add grunt-cli
4148
```
4249

4350
## Forking Angular on Github
@@ -62,12 +69,9 @@ cd angular.js
6269
git remote add upstream "https://github.com/angular/angular.js.git"
6370

6471
# Install node.js dependencies:
65-
npm install
66-
67-
# Install bower components:
68-
bower install
72+
yarn install
6973

70-
# Build AngularJS:
74+
# Build AngularJS (which will install `bower` dependencies automatically):
7175
grunt package
7276
```
7377

@@ -78,11 +82,11 @@ Administrator). This is because `grunt package` creates some symbolic links.
7882
</div>
7983

8084
<div class="alert alert-warning">
81-
**Note:** If you're using Linux, and npm install fails with the message
82-
'Please try running this command again as root/Administrator.', you may need to globally install grunt and bower:
85+
**Note:** If you're using Linux, and `yarn install` fails with the message
86+
'Please try running this command again as root/Administrator.', you may need to globally install `grunt` and `bower`:
8387
<ul>
84-
<li>sudo npm install -g grunt-cli</li>
85-
<li>sudo npm install -g bower</li>
88+
<li>sudo yarn global add grunt-cli</li>
89+
<li>sudo yarn global add bower</li>
8690
</ul>
8791

8892
</div>

src/ngComponentRouter/Router.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
*
1111
* @installation
1212
*
13-
* Currently, the **Component Router** module must be installed via `npm`, it is not yet available
13+
* Currently, the **Component Router** module must be installed via `npm`/`yarn`, it is not yet available
1414
* on Bower or the Google CDN.
1515
*
1616
* ```bash
17-
* npm install @angular/[email protected] --save
17+
* yarn add @angular/[email protected]
1818
* ```
1919
*
2020
* Include `angular_1_router.js` in your HTML:

src/ngMock/angular-mocks.js

+1
Original file line numberDiff line numberDiff line change
@@ -2347,6 +2347,7 @@ angular.mock.$ComponentControllerProvider = ['$compileProvider',
23472347
* * [Google CDN](https://developers.google.com/speed/libraries/devguide#angularjs) e.g.
23482348
* `"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-mocks.js"`
23492349
* * [NPM](https://www.npmjs.com/) e.g. `npm install [email protected]`
2350+
* * [Yarn](https://yarnpkg.com) e.g. `yarn add [email protected]`
23502351
* * [Bower](http://bower.io) e.g. `bower install angular-mocks#X.Y.Z`
23512352
* * [code.angularjs.org](https://code.angularjs.org/) (discouraged for production use) e.g.
23522353
* `"//code.angularjs.org/X.Y.Z/angular-mocks.js"`

0 commit comments

Comments
 (0)