aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/misc/contribute.ngdoc
diff options
context:
space:
mode:
authorDave Geddes2012-10-21 00:37:59 -0600
committerIgor Minar2013-03-05 23:00:33 -0800
commit79b51d5b578927bd510123c81953e7cc8c72f211 (patch)
tree1499ce8bdb464671b711744974e883583d22b083 /docs/content/misc/contribute.ngdoc
parentfe8d893b839e9b14e3e55a3a0523cc1e6355bdd5 (diff)
downloadangular.js-79b51d5b578927bd510123c81953e7cc8c72f211.tar.bz2
chore(Grunt): switch from Rake to Grunt
Migrates the Angular project from Rake to Grunt. Benefits: - Drops Ruby dependency - Lowers barrier to entry for contributions from JavaScript ninjas - Simplifies the Angular project setup and build process - Adopts industry-standard tools specific to JavaScript projects - Support building angular.js on Windows platform (really?!? why?!?) BREAKING CHANGE: Rake is completely replaced by Grunt. Below are the deprecated Rake tasks and their Grunt equivalents: rake --> grunt rake package --> grunt package rake init --> N/A rake clean --> grunt clean rake concat_scenario --> grunt build:scenario rake concat --> grunt build rake concat_scenario --> grunt build:scenario rake minify --> grunt minify rake version --> grunt write:version rake docs --> grunt docs rake webserver --> grunt webserver rake test --> grunt test rake test:unit --> grunt test:unit rake test:<jqlite|jquery|modules|e2e> --> grunt test:<jqlite|jquery|modules|end2end|e2e> rake test[Firefox+Safari] --> grunt test --browsers Firefox,Safari rake test[Safari] --> grunt test --browsers Safari rake autotest --> grunt autotest NOTES: * For convenience grunt test:e2e starts a webserver for you, while grunt test:end2end doesn't. Use grunt test:end2end if you already have the webserver running. * Removes duplicate entry for Describe.js in the angularScenario section of angularFiles.js * Updates docs/src/gen-docs.js to use #done intead of the deprecated #end * Uses grunt-contrib-connect instead of lib/nodeserver (removed) * Removes nodeserver.sh, travis now uses grunt webserver * Built and minified files are identical to Rake's output, with the exception of one less character for git revisions (using --short) and a couple minor whitespace differences Closes #199
Diffstat (limited to 'docs/content/misc/contribute.ngdoc')
-rw-r--r--docs/content/misc/contribute.ngdoc40
1 files changed, 24 insertions, 16 deletions
diff --git a/docs/content/misc/contribute.ngdoc b/docs/content/misc/contribute.ngdoc
index 9f9123b4..59c3acdf 100644
--- a/docs/content/misc/contribute.ngdoc
+++ b/docs/content/misc/contribute.ngdoc
@@ -81,15 +81,11 @@ Several steps are needed to check out and build AngularJS:
Before you can build AngularJS, you must install or configure the following dependencies on your
machine:
-* {@link http://rake.rubyforge.org Rake}: We use Rake as our build system, which is pre-installed
-on most Macintosh and Linux machines. If that is not true in your case, you can grab it from the
-Rake website.
-
* Git: The {@link http://help.github.com/mac-git-installation Github Guide to Installing Git} is
quite a good source for information on Git.
-* {@link http://nodejs.org Node.js}: We use Node to generate the documentation and to run a
-development web server. Depending on your system, you can install Node either from source or as a
+* {@link http://nodejs.org Node.js}: We use Node to generate the documentation, run a
+development web server, run tests, and generate a build. Depending on your system, you can install Node either from source or as a
pre-packaged bundle.
Once installed, you'll also need several npms (node packages), which you can install once you checked out a local copy
@@ -98,6 +94,10 @@ pre-packaged bundle.
* `cd angular.js`
* `npm install`
+* {@link http://gruntjs.com Grunt}: We use Grunt as our build system. Install the grunt command-line tool globally with:
+
+ * `sudo npm install -g grunt-cli`
+
## Creating a Github Account and Forking Angular
@@ -108,7 +108,7 @@ https://github.com/angular/angular.js main angular repository}.
## Building AngularJS
-To build AngularJS, you check out the source code and use Rake to generate the non-minified and
+To build AngularJS, you check out the source code and use Grunt to generate the non-minified and
minified AngularJS files:
1. To clone your Github repository, run:
@@ -129,7 +129,7 @@ minified AngularJS files:
5. To build AngularJS, run:
- rake package
+ grunt package
The build output can be located under the `build` directory. It consists of the following files and
directories:
@@ -158,7 +158,7 @@ made available a local web server based on Node.js.
1. To start the web server, run:
- rake webserver
+ grunt webserver
2. To access the local server, go to this website:
@@ -173,18 +173,20 @@ made available a local web server based on Node.js.
Our unit and integration tests are written with Jasmine and executed with Testacular. To run all of the
tests once on Chrome run:
- rake test:unit
+ grunt test:unit
To run the tests on other browsers (Chrome, ChromeCanary, Firefox, Opera and Safari are pre-configured) use:
- rake test:unit[Opera+Firefox]
+ grunt test:unit --browsers Opera,Firefox
+
+Note there should be _no spaces between browsers_. `Opera, Firefox` is INVALID.
During development it's however more productive to continuously run unit tests every time the source or test files
change. To execute tests in this mode run:
1. To start the Testacular server, capture Chrome browser and run unit tests, run:
- rake autotest:jqlite
+ grunt autotest:jqlite
2. To capture more browsers, open this url in the desired browser (url might be different if you have multiple instance
of Testacular running, read Testacular's console output for the correct url):
@@ -194,9 +196,9 @@ change. To execute tests in this mode run:
3. To re-run tests just change any source or test file.
-To learn more about all of the preconfigured Rake tasks run:
+To learn more about all of the preconfigured Grunt tasks run:
- rake -T
+ grunt --help
## Running the end-to-end Test Suite
@@ -205,7 +207,7 @@ To run the E2E test suite:
1. Start the local web server if it's not running already.
- rake webserver
+ grunt webserver
2. In a browser, go to:
@@ -213,7 +215,13 @@ To run the E2E test suite:
or in terminal run:
- rake test:e2e
+ grunt test:end2end
+
+For convenience you can also simply run:
+
+ grunt test:e2e
+
+This will start the webserver for you and run the tests.