Skip to content

arcturus/node-firefoxos-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firefox OS Node Command Line Develoment Tools

node library + command line tool to perform basic web app development stuff

Currenty supporting

  • Installing app
  • Taking screenshots
  • Logcat
  • Reset b2g process
  • Close App
  • Launch App

Next to come

  • Uninstall

Based on @fabricedesr amazing work on b2gremote and digitalrald for his work on make-fxos-install

Don't forget

Enable remote debugging in the device and of course run

npm install

Examples

In the examples folder you could find some code that shows the use of this library, also find below some code examples.

Installing

var ffos_cli = require('./index.js');

ffos_cli.installPackagedApp('boilerplate', './application.zip', function onInstall(err, done) {
  if (err) {
    console.error('Error updating app: ' + err);
  } else {
    console.log('Successfuly installed');
  }
  process.exit(0);
});

Stopping an app

var ffos_cli = require('./index.js');

ffos_cli.closeApp('boilerplate', function onClose(err, done) {
  if (err) {
    console.error('Error closing app: ' + err);
  } else {
    console.log('Application closed');
  }
  process.exit(0);
});

Launching an app

var ffos_cli = require('./index.js');

ffos_cli.launchApp('boilerplate', function onLaunch(err, done) {
  if (err) {
    console.error('Error launching app: ' + err);
  } else {
    console.log('Application launched');
  }
  process.exit(0);
});

Reset B2G process

var ffos_cli = require('./index.js');

ffos_cli.resetB2G(function onReset() {
  console.log('B2G process reseted');
  process.exit(0);
});

Logcat

var ffos_cli = require('./index.js');

ffos_cli.logcat(); //Output logcat from device continously

Bitdeli Badge

About

Command line development tools for Firefox OS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published