Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated to reflect grunt changes

  • Loading branch information...
commit 3bffa099d50de0953b241af4b97f9b91b5ae9a0f 1 parent 25abed5
@gseguin gseguin authored
Showing with 17 additions and 24 deletions.
  1. +17 −24 README.md
View
41 README.md
@@ -18,8 +18,10 @@ Currently the library is shipped on the jQuery CDN/download as a single monolith
* `js` - resolve dependencies, build, concat, and minify the JavaScript used for jQuery Mobile
* `css` - resolve dependencies, build, concat, and minify all the css, just the structure css, and just the theme css
-* `docs` - build the js and css, and make the docs ready for static consumption
+* `demos` - build the js and css, and make the docs ready for static consumption
* `zip` - package all the JavaScript and all the css into a zip archive
+* `dist` (default target) - all of the above
+* `lint` - Validates JavaScript files using [JSHint](http://jshint.com/)
### Download Builder
@@ -27,20 +29,15 @@ The easiest way to obtain a custom build is to use the [download builder](http:/
### Requirements
-The `js` and `css` build targets require [node.js](http://nodejs.org/) and its packaged NPM package manager. For the other build targets, `docs` and `zip`, bash is also required. For more information on installing node please see its [documentation](http://nodejs.org/#download). As for bash it's generally installed as the default shell in many POSIX compliant environments (OSX, Linux, BSD, etc).
+* [Node.js](http://nodejs.org/) ~0.8.22
+* [Grunt](http://gruntjs.com/) >=0.4.0
### Commands
-With node installed you can run the `js` and `css` targets by simply issuing the following from the project root:
+With node and grunt installed you can run the default target by simply issuing the following from the project root:
npm install
- node node_modules/.bin/grunt js # or css
-
-Note that if you have the appropriate version of [grunt](https://github.com/cowboy/grunt), our build tool, installed globally you can substitute `grunt` wherever you see `node node_modules/.bin/grunt`. For the remainder of the build documentation we will prefer the more concise `grunt`.
-
-If you want to use the `docs` and `zip` targets you will need bash and they can be run with the following
-
- `grunt docs #` or `grunt zip`
+ grunt
### JavaScript
@@ -82,7 +79,7 @@ To create a new theme:
THEME=my-theme grunt css
-4. The output will be available in the `$PROJECT_ROOT/compiled`
+4. The output will be available in the `$PROJECT_ROOT/dist`
Again this assumes the theme css files are available in the `css/themes/$THEME/` directory relative to the project root, `css/themes/my-theme/` in the example.
@@ -110,23 +107,19 @@ Once you have your web server setup you can point it at the project directory.
Automated testing forms the backbone of the jQuery Mobile project's QA activities. As a contributor or patch submitter you will be expected to run the test suite for the code your patches affect. Our continuous integration server will address the remainder of the test suite.
-There are two primary ways to run the test suite. Both of them require a server configured in the previously prescribed manner. The location of which will hereafter be referred to as `$WEB_SERVER` and should include the protocol. First, you can run the tests individually by directing your browser to the different test pages associated with the area in which you are working. For example, to run the tests for `js/jquery.mobile.forms.slider.js` visit `$WEB_SERVER/tests/unit/slider/`. To find out which test pages are available you can list them with:
-
- grunt config:test:pages
-
-_NOTE_ See the [build requirements](#requirements) for node/grunt install information.
-
-Second you can run the tests using the [PhantomJS](http://phantomjs.org/) headless Webkit browser which must be [installed](http://code.google.com/p/phantomjs/wiki/Installation). Once `phantomjs` is in your `PATH` the following will execute the whole test suite:
-
- JUNIT_OUTPUT=build/test-results/ ROOT_DOMAIN=$WEB_SERVER grunt test
+You can run the all the test suites by running:
-You can confine the headless run to a single test page or set of test pages using the `TEST_PATH` environment variable. For example:
+ grunt test
- TEST_PATH=slider JUNIT_OUTPUT=build/test-results/ ROOT_DOMAIN=$WEB_SERVER grunt test
+You can choose to run only a subset of the tests by adding the `--suites` option like:
+
+ grunt test --suites=button,slider
+
+will only run the tests under `tests/unit/button/` and `tests/unit/slider/`.
-will only run the tests where the path contains the string `slider`, eg `tests/unit/slider/`. *NOTE* that the phantom tests currently require that the web server be running to access and run the tests properly because of the PHP dependency that many of them share. Additionally the test suite is run against many versions of jQuery using the `JQUERY` environment variable. For example if you wanted to run the test suite against two of the currently supported versions, 1.7.2 and 1.9.0, the command would take the following form:
+You can also specify which versions of jQuery you want to test jQuery Mobile with by using the `--jqueries` option:
- JQUERY=1.7.2,1.9.0 JUNIT_OUTPUT=build/test-results/ ROOT_DOMAIN=$WEB_SERVER grunt test
+ grunt test --jqueries=1.8.2,git
### Rebasing
Please sign in to comment.
Something went wrong with that request. Please try again.