зеркало из
1
0
Форкнуть 0

Improve install/usage instruction

It took me some time to figure out how I was supposed to get started, and there were some errors in the npm commands.
I hope this helps.
This commit is contained in:
Louis-Rémi Babé 2015-04-14 12:30:05 +02:00
Родитель 0cc021f8fe
Коммит 6efc8d299b
1 изменённых файлов: 10 добавлений и 12 удалений

Просмотреть файл

@ -4,19 +4,17 @@
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
[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.
Install the dependencies by running `npm install` in the directory of this project.
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.