B2G/Gaia Helper Scripts
Want to see pretty graphs? Log in now!
npm install b2g-scripts
|1||downloads in the last day|
|94||downloads in the last week|
|459||downloads in the last month|
|Last Published By|
|Version||0.4.2 last updated 9 months ago|
|Keywords||b2g, cli, gaia, tools|
|Dependencies||test-agent, marionette-client, match-files, optimist, node-static|
Contains a single cli script -
b2g-scripts with a growing number of subcommands.
In general it is assumed you have a working b2g emulator/desktop/phone with marionette turned on and listening on port 2828.
Commands like reload-app are not going to be useful if you're not in DEBUG mode (everything is in offline cache).
# notice the -g option for global npm install b2g-scripts -g
Recomended B2G Desktop settings
cd $GAIA_DIR make DEBUG=1
b2g-scripts with no arguments to see the list of current commands.
Each command has sub options as well and all respond to the --help option.
b2g-scripts watch --help
Watches a directory for web dev changes js/css/html/properties files. Executes a cli command. You can use this to chain other sub commands.
# I use this all the time to reload app when I am making rapid # html/css changes b2g-scripts watch "b2g-scripts reload-app"
Runs any of the marionette commands with n number of arguments
b2g-scripts cmd goUrl http://google.com
Reloads currently running app.
WARNING this is bound to the current implementation of gaia and will break if that implementation changes.
Output hostfile definition to add to /etc/hosts
b2g-scripts hosts --gaia $GAIA_DIR --ip 127.0.0.1
Starts http server. Faster then HTTPD but designed for use with the emulator/phone.
b2g-scripts server --gaia $GAIA_DIR --port 8081