docs(*): switch from npm to yarn
This commit is contained in:
+7
-3
@@ -206,7 +206,9 @@ We have very precise rules over how our git commit messages can be formatted. T
|
||||
readable messages** that are easy to follow when looking through the **project history**. But also,
|
||||
we use the git commit messages to **generate the AngularJS change log**.
|
||||
|
||||
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.
|
||||
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 `yarn run commit`
|
||||
in your terminal after staging your changes in git.
|
||||
|
||||
### Commit Message Format
|
||||
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
|
||||
@@ -226,7 +228,8 @@ Any line of the commit message cannot be longer 100 characters! This allows the
|
||||
to read on GitHub as well as in various git tools.
|
||||
|
||||
### Revert
|
||||
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.
|
||||
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.
|
||||
|
||||
### Type
|
||||
Must be one of the following:
|
||||
@@ -261,7 +264,8 @@ The body should include the motivation for the change and contrast this with pre
|
||||
The footer should contain any information about **Breaking Changes** and is also the place to
|
||||
reference GitHub issues that this commit **Closes**.
|
||||
|
||||
**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.
|
||||
**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.
|
||||
|
||||
A detailed explanation can be found in this [document][commit-message-format].
|
||||
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ You can mention him in the relevant thread like this: `@btford`.
|
||||
|
||||
> Thanks for submitting this issue!
|
||||
> Unfortunately, we don't think this functionality belongs in core.
|
||||
> The good news is that you could easily implement this as a third-party module and publish it on Bower and/or npm.
|
||||
> 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.
|
||||
|
||||
|
||||
## Assigning Work
|
||||
|
||||
@@ -6,7 +6,7 @@ var packagePath = __dirname;
|
||||
var Package = require('dgeni').Package;
|
||||
|
||||
// Create and export a new Dgeni package called angularjs. This package depends upon
|
||||
// the ngdoc, nunjucks, and examples packages defined in the dgeni-packages npm module.
|
||||
// the ngdoc, nunjucks, and examples packages defined in the dgeni-packages node module.
|
||||
module.exports = new Package('angularjs', [
|
||||
require('dgeni-packages/ngdoc'),
|
||||
require('dgeni-packages/nunjucks'),
|
||||
|
||||
@@ -4,7 +4,7 @@ var path = require('canonical-path');
|
||||
/**
|
||||
* dgService getVersion
|
||||
* @description
|
||||
* Find the current version of the bower component (or npm module)
|
||||
* Find the current version of the bower component (or node module)
|
||||
*/
|
||||
module.exports = function getVersion(readFilesProcessor) {
|
||||
var basePath = readFilesProcessor.basePath;
|
||||
|
||||
@@ -21,7 +21,9 @@
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.npmjs.com/">NPM</a> e.g.
|
||||
{% code %}npm install {$ doc.packageName $}@X.Y.Z{% endcode %}
|
||||
{% code %}npm install --save {$ doc.packageName $}@X.Y.Z{% endcode %}
|
||||
or
|
||||
{% code %}yarn add {$ doc.packageName $}@X.Y.Z{% endcode %}
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://bower.io">Bower</a> e.g.
|
||||
|
||||
@@ -149,7 +149,7 @@ You can see the complete application running below.
|
||||
<h1 class="title">Component Router</h1>
|
||||
<app></app>
|
||||
|
||||
<!-- Load up the router library - normally you might use npm and host it locally -->
|
||||
<!-- Load up the router library - normally you might use npm/yarn and host it locally -->
|
||||
<script src="https://unpkg.com/@angular/router@0.2.0/angular1/angular_1_router.js"></script>
|
||||
</file>
|
||||
|
||||
@@ -467,13 +467,12 @@ to display list and detail views of Heroes and Crises.
|
||||
|
||||
## Install the libraries
|
||||
|
||||
It is easier to use npm to install the **Component Router** module. For this guide we will also install
|
||||
AngularJS itself via npm:
|
||||
It is easier to use [yarn](https://yarnpkg.com) to install the **Component Router** module.
|
||||
For this guide we will also install AngularJS itself via yarn:
|
||||
|
||||
```bash
|
||||
npm init
|
||||
npm install angular@1.5.x --save
|
||||
npm install @angular/router@0.2.0 --save
|
||||
yarn init
|
||||
yarn add angular@1.5.x @angular/router@0.2.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ Karma to run against a number of browsers, which is useful for being confident t
|
||||
works on all browsers you need to support. Karma is executed on the command line and will display
|
||||
the results of your tests on the command line once they have run in the browser.
|
||||
|
||||
Karma is a NodeJS application, and should be installed through npm. Full installation instructions
|
||||
Karma is a NodeJS application, and should be installed through npm/yarn. Full installation instructions
|
||||
are available on [the Karma website](http://karma-runner.github.io/0.12/intro/installation.html).
|
||||
|
||||
### Jasmine
|
||||
@@ -461,7 +461,7 @@ describe("Deep Thought", function() {
|
||||
}));
|
||||
|
||||
it("has calculated the answer correctly", inject(function(DeepThought) {
|
||||
// Because of sharedInjector, we have access to the instance of the DeepThought service
|
||||
// Because of sharedInjector, we have access to the instance of the DeepThought service
|
||||
// that was provided to the beforeAll() hook. Therefore we can test the generated answer
|
||||
expect(DeepThought.answer).toBe(42);
|
||||
}));
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# Building and Testing AngularJS
|
||||
|
||||
This document describes how to set up your development environment to build and test AngularJS, and
|
||||
explains the basic mechanics of using `git`, `node`, `npm`, `grunt`, and `bower`.
|
||||
explains the basic mechanics of using `git`, `node`, `yarn`, `grunt`, and `bower`.
|
||||
|
||||
See the [contributing guidelines](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md)
|
||||
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
|
||||
machine:
|
||||
|
||||
* [Git](http://git-scm.com/): The [Github Guide to
|
||||
Installing Git](https://help.github.com/articles/set-up-git) is a good source of information.
|
||||
Installing Git](https://help.github.com/articles/set-up-git) is a good source of information.
|
||||
|
||||
* [Node.js v4.x](http://nodejs.org): We use Node to generate the documentation, run a
|
||||
development web server, run tests, and generate distributable files. Depending on your system, you can install Node either from source or as a
|
||||
pre-packaged bundle. (Currently our build does not work properly on Node v5 or greater - please use v4.x.)
|
||||
* [Node.js v6.x (LTS)](http://nodejs.org): We use Node to generate the documentation, run a
|
||||
development web server, run tests, and generate distributable files. Depending on your system,
|
||||
you can install Node either from source or as a pre-packaged bundle.
|
||||
|
||||
We recommend using [nvm](https://github.com/creationix/nvm) to manage and install Node.js,
|
||||
which makes it easy to change the version of Node.js per project.
|
||||
|
||||
* [Yarn](https://yarnpkg.com): We use Yarn to install our Node.js module dependencies (rather than using npm).
|
||||
There are detailed installation instructions available at https://yarnpkg.com/en/docs/install.
|
||||
|
||||
* [Java](http://www.java.com): We minify JavaScript using our
|
||||
[Closure Tools](https://developers.google.com/closure/) jar. Make sure you have Java (version 7 or higher) installed
|
||||
and included in your [PATH](http://docs.oracle.com/javase/tutorial/essential/environment/paths.html) variable.
|
||||
[Closure Tools](https://developers.google.com/closure/) jar. Make sure you have Java (version 7 or higher)
|
||||
installed and included in your [PATH](http://docs.oracle.com/javase/tutorial/essential/environment/paths.html)
|
||||
variable.
|
||||
|
||||
* [Grunt](http://gruntjs.com): We use Grunt as our build system. Install the grunt command-line tool globally with:
|
||||
|
||||
```shell
|
||||
npm install -g grunt-cli
|
||||
yarn global add grunt-cli
|
||||
```
|
||||
|
||||
## Forking Angular on Github
|
||||
@@ -62,12 +69,9 @@ cd angular.js
|
||||
git remote add upstream "https://github.com/angular/angular.js.git"
|
||||
|
||||
# Install node.js dependencies:
|
||||
npm install
|
||||
yarn install
|
||||
|
||||
# Install bower components:
|
||||
bower install
|
||||
|
||||
# Build AngularJS:
|
||||
# Build AngularJS (which will install `bower` dependencies automatically):
|
||||
grunt package
|
||||
```
|
||||
|
||||
@@ -78,11 +82,11 @@ Administrator). This is because `grunt package` creates some symbolic links.
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warning">
|
||||
**Note:** If you're using Linux, and npm install fails with the message
|
||||
'Please try running this command again as root/Administrator.', you may need to globally install grunt and bower:
|
||||
**Note:** If you're using Linux, and `yarn install` fails with the message
|
||||
'Please try running this command again as root/Administrator.', you may need to globally install `grunt` and `bower`:
|
||||
<ul>
|
||||
<li>sudo npm install -g grunt-cli</li>
|
||||
<li>sudo npm install -g bower</li>
|
||||
<li>sudo yarn global add grunt-cli</li>
|
||||
<li>sudo yarn global add bower</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
*
|
||||
* @installation
|
||||
*
|
||||
* Currently, the **Component Router** module must be installed via `npm`, it is not yet available
|
||||
* Currently, the **Component Router** module must be installed via `npm`/`yarn`, it is not yet available
|
||||
* on Bower or the Google CDN.
|
||||
*
|
||||
* ```bash
|
||||
* npm install @angular/router@0.2.0 --save
|
||||
* yarn add @angular/router@0.2.0
|
||||
* ```
|
||||
*
|
||||
* Include `angular_1_router.js` in your HTML:
|
||||
|
||||
Vendored
+1
@@ -2322,6 +2322,7 @@ angular.mock.$ComponentControllerProvider = ['$compileProvider',
|
||||
* * [Google CDN](https://developers.google.com/speed/libraries/devguide#angularjs) e.g.
|
||||
* `"//ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-mocks.js"`
|
||||
* * [NPM](https://www.npmjs.com/) e.g. `npm install angular-mocks@X.Y.Z`
|
||||
* * [Yarn](https://yarnpkg.com) e.g. `yarn add angular-mocks@X.Y.Z`
|
||||
* * [Bower](http://bower.io) e.g. `bower install angular-mocks#X.Y.Z`
|
||||
* * [code.angularjs.org](https://code.angularjs.org/) (discouraged for production use) e.g.
|
||||
* `"//code.angularjs.org/X.Y.Z/angular-mocks.js"`
|
||||
|
||||
Reference in New Issue
Block a user