Merge pull request #2 from louisremi/louisremi-improve-readme
Improve install/usage instruction
This commit is contained in:
Коммит
f07bfaf847
22
README.md
22
README.md
|
@ -4,19 +4,17 @@
|
||||||
|
|
||||||
This is part of the [node-firefox](https://github.com/mozilla/node-firefox) project.
|
This is part of the [node-firefox](https://github.com/mozilla/node-firefox) project.
|
||||||
|
|
||||||
## Getting it
|
## What you need
|
||||||
|
|
||||||
### Clone it
|
- [node.js](http://nodejs.org) and [git](http://git-scm.com/) installed on your machine
|
||||||
|
- a Firefox OS simulator installed using [WebIDE](https://developer.mozilla.org/en-US/docs/Tools/WebIDE)
|
||||||
|
- the files of this demo (clone this repo or download [the zip](https://github.com/mozilla/node-firefox-examples-gulp/archive/master.zip))
|
||||||
|
|
||||||
`git clone https://github.com/mozilla/node-firefox-examples-gulp.git`
|
## Build and run the example
|
||||||
|
|
||||||
### Or download
|
Install the dependencies by running `npm install` in the directory of this project.
|
||||||
|
|
||||||
[the zip](https://github.com/mozilla/node-firefox-examples-gulp/archive/master.zip)
|
|
||||||
|
|
||||||
## Initialising
|
|
||||||
|
|
||||||
Install node.js if not installed yet, then cd to the directory and run `npm init`.
|
|
||||||
|
|
||||||
To build the files into the `build` folder just do `npm start`. This will build the app into `build/index.html` which you can open with your browser to see it in action, unless you're using app APIs in which case you will need to run it in a Firefox OS simulator. There are two other gulp tasks available, `npm default-one` will launch the first simulator it can find and push the app to it, launch it, and watch for CSS changes. `npm default-all` will do the same but for all the simulators you have installed in your system.
|
|
||||||
|
|
||||||
|
There are three npm scripts available:
|
||||||
|
- `npm start` will build the app into `build/index.html` which you can open with your browser to see it in action, unless you're using app APIs in which case you will need to run it in a Firefox OS simulator,
|
||||||
|
- `npm run default-one` will launch the first simulator it can find and push the app to it, launch it, and watch for CSS changes,
|
||||||
|
- `npm run default-all` will do the same but for all the simulators you have installed in your system.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче