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

Commit 83e6eef

Browse files
frederikprijckNarretz
authored andcommitted
docs(*): remove usage of global grunt-cli
Previously, the `DEVELOPERS.md` and `CONTRIBUTING.md` files refered to global `grunt-cli` by default. This commit ensures the local `grunt-cli` is used by default and mentiones the possibility to still use the global `grunt-cli`.
1 parent 87270cb commit 83e6eef

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed

DEVELOPERS.md

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,9 @@ machine:
3434
to be installed and included in your
3535
[PATH](http://docs.oracle.com/javase/tutorial/essential/environment/paths.html) variable.
3636

37-
* [Grunt](http://gruntjs.com): We use Grunt as our build system. Install the grunt command-line tool
38-
globally with:
39-
40-
```shell
41-
yarn global add grunt-cli
42-
```
37+
* [Grunt](http://gruntjs.com): We use Grunt as our build system. We're using it as a local dependency,
38+
but you can also add the grunt command-line tool globally (with `yarn global add grunt-cli`), which allows
39+
you to leave out the `yarn` prefix for all our grunt commands.
4340

4441
### Forking AngularJS on Github
4542

@@ -70,20 +67,11 @@ git remote add upstream "https://github.com/angular/angular.js.git"
7067
yarn install
7168

7269
# Build AngularJS (which will install `bower` dependencies automatically):
73-
grunt package
70+
yarn grunt package
7471
```
7572

7673
**Note:** If you're using Windows, you must use an elevated command prompt (right click, run as
77-
Administrator). This is because `grunt package` creates some symbolic links.
78-
79-
**Note:** If you're using Linux, and `yarn install` fails with the message
80-
'Please try running this command again as root/Administrator.', you may need to globally install
81-
`grunt` and `bower`:
82-
83-
```shell
84-
sudo yarn global add grunt-cli
85-
sudo yarn global add bower
86-
```
74+
Administrator). This is because `yarn grunt package` creates some symbolic links.
8775

8876
The build output is in the `build` directory. It consists of the following files and
8977
directories:
@@ -105,7 +93,7 @@ HTTP server. For this purpose, we have made available a local web server based o
10593

10694
1. To start the web server, run:
10795
```shell
108-
grunt webserver
96+
yarn grunt webserver
10997
```
11098

11199
2. To access the local server, enter the following URL into your web browser:
@@ -125,13 +113,13 @@ We write unit and integration tests with Jasmine and execute them with Karma. To
125113
tests once on Chrome run:
126114

127115
```shell
128-
grunt test:unit
116+
yarn grunt test:unit
129117
```
130118

131119
To run the tests on other browsers (Chrome, ChromeCanary, Firefox and Safari are pre-configured) use:
132120

133121
```shell
134-
grunt test:unit --browsers=Chrome,Firefox
122+
yarn grunt test:unit --browsers=Chrome,Firefox
135123
```
136124

137125
**Note:** there should be _no spaces between browsers_. `Chrome, Firefox` is INVALID.
@@ -143,9 +131,9 @@ For example, to run the whole unit test suite:
143131

144132
```shell
145133
# Browserstack
146-
grunt test:unit --browsers=BS_Chrome,BS_Firefox,BS_Safari,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_8,BS_iOS_9,BS_iOS_10
134+
yarn grunt test:unit --browsers=BS_Chrome,BS_Firefox,BS_Safari,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_8,BS_iOS_9,BS_iOS_10
147135
# Saucelabs
148-
grunt test:unit --browsers=BS_Chrome,BS_Firefox,BS_Safari,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_8,BS_iOS_9,BS_iOS_10
136+
yarn grunt test:unit --browsers=BS_Chrome,BS_Firefox,BS_Safari,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_8,BS_iOS_9,BS_iOS_10
149137
```
150138

151139
Running these commands requires you to set up [Karma Browserstack][karma-browserstack] or
@@ -157,7 +145,7 @@ source or test files change. To execute tests in this mode run:
157145
1. To start the Karma server, capture Chrome browser and run unit tests, run:
158146

159147
```shell
160-
grunt autotest
148+
yarn grunt autotest
161149
```
162150

163151
2. To capture more browsers, open this URL in the desired browser (URL might be different if you
@@ -173,7 +161,7 @@ source or test files change. To execute tests in this mode run:
173161
To learn more about all of the preconfigured Grunt tasks run:
174162

175163
```shell
176-
grunt --help
164+
yarn grunt --help
177165
```
178166

179167

@@ -182,7 +170,7 @@ grunt --help
182170
AngularJS's end to end tests are run with Protractor. Simply run:
183171

184172
```shell
185-
grunt test:e2e
173+
yarn grunt test:e2e
186174
```
187175

188176
This will start the webserver and run the tests on Chrome.
@@ -329,7 +317,7 @@ documentation generation tool [Dgeni][dgeni].
329317
The docs can be built from scratch using grunt:
330318

331319
```shell
332-
grunt docs
320+
yarn grunt docs
333321
```
334322

335323
This defers the doc-building task to `gulp`.
@@ -338,7 +326,7 @@ Note that the docs app is using the local build files to run. This means you mig
338326
the build:
339327

340328
```shell
341-
grunt build
329+
yarn grunt build
342330
```
343331

344332
(This is also necessary if you are making changes to minErrors).

0 commit comments

Comments
 (0)