Update readme.md

This commit is contained in:
Éric Lemoine
2013-03-04 10:15:31 +01:00
parent b31d5cdb4a
commit 2238c9bd6a

View File

@@ -21,7 +21,7 @@ Run build.py:
Windows users should run `build` instead.
## Run examples locally
## Run Examples locally
Run the [Plovr](http://plovr.com/) web server with:
@@ -39,18 +39,20 @@ and explore the `examples/` directory, for example by opening
You can turn off compilation by appending `?mode=RAW` to the URL, for example
<http://localhost:8000/examples/side-by-side.html?mode=RAW>. (By default mode is `ADVANCED`.)
Run examples without Plovr:
The examples can also be run against the `ol.js` standalone lib, without Plovr,
just like the examples [hosted](http://openlayers.github.com/ol3/master/examples/)
on GitHub. You will want to run the examples against the standalone lib to verify
that will work correctly when copied on GitHub (as GitHub pages). Start by executing
the `hostexamples` build target:
on GitHub. Start by executing the `hostexamples` build target:
$ ./build.py hostexamples
This will build `ol.js` and `ol.css`, creates the examples index page, and copy everything to
`build/gh-pages/<branch_name>/`, where `<branch_name>` is the name of the local checked
out Git branch. You can now open the `build/gh-pages/<branch_name>examples` directory
in the browser, for example: <http://localhost:8000/build/gh-pages/master/examples/side-by-side.html>.
This will build `ol.js`, `ol-simple.js`, `ol-whitespace.js`, and `ol.css`, create the examples index page,
and copy everything to `build/gh-pages/<branch_name>/`, where `<branch_name>` is the name of the local
checked out Git branch. You can now open the examples index page in the browser, for example:
<http://localhost:8000/build/gh-pages/master/examples/>. To make an example use `ol-simple.js` or
`ol-whitespace.js` instead of `ol.js` append `?mode=simple` or `?mode=whitespace` to the example
URL.
## Run tests