@@ -34,12 +34,9 @@ machine:
34
34
to be installed and included in your
35
35
[ PATH] ( http://docs.oracle.com/javase/tutorial/essential/environment/paths.html ) variable.
36
36
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.
43
40
44
41
### Forking AngularJS on Github
45
42
@@ -70,20 +67,11 @@ git remote add upstream "https://github.com/angular/angular.js.git"
70
67
yarn install
71
68
72
69
# Build AngularJS (which will install `bower` dependencies automatically):
73
- grunt package
70
+ yarn grunt package
74
71
```
75
72
76
73
** 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.
87
75
88
76
The build output is in the ` build ` directory. It consists of the following files and
89
77
directories:
@@ -105,7 +93,7 @@ HTTP server. For this purpose, we have made available a local web server based o
105
93
106
94
1 . To start the web server, run:
107
95
``` shell
108
- grunt webserver
96
+ yarn grunt webserver
109
97
```
110
98
111
99
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
125
113
tests once on Chrome run:
126
114
127
115
``` shell
128
- grunt test:unit
116
+ yarn grunt test:unit
129
117
```
130
118
131
119
To run the tests on other browsers (Chrome, ChromeCanary, Firefox and Safari are pre-configured) use:
132
120
133
121
``` shell
134
- grunt test:unit --browsers=Chrome,Firefox
122
+ yarn grunt test:unit --browsers=Chrome,Firefox
135
123
```
136
124
137
125
** 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:
143
131
144
132
``` shell
145
133
# 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
147
135
# 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
149
137
```
150
138
151
139
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:
157
145
1 . To start the Karma server, capture Chrome browser and run unit tests, run:
158
146
159
147
``` shell
160
- grunt autotest
148
+ yarn grunt autotest
161
149
```
162
150
163
151
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:
173
161
To learn more about all of the preconfigured Grunt tasks run:
174
162
175
163
``` shell
176
- grunt --help
164
+ yarn grunt --help
177
165
```
178
166
179
167
@@ -182,7 +170,7 @@ grunt --help
182
170
AngularJS's end to end tests are run with Protractor. Simply run:
183
171
184
172
``` shell
185
- grunt test:e2e
173
+ yarn grunt test:e2e
186
174
```
187
175
188
176
This will start the webserver and run the tests on Chrome.
@@ -329,7 +317,7 @@ documentation generation tool [Dgeni][dgeni].
329
317
The docs can be built from scratch using grunt:
330
318
331
319
``` shell
332
- grunt docs
320
+ yarn grunt docs
333
321
```
334
322
335
323
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
338
326
the build:
339
327
340
328
``` shell
341
- grunt build
329
+ yarn grunt build
342
330
```
343
331
344
332
(This is also necessary if you are making changes to minErrors).
0 commit comments