Home

Awesome

JPM Addon Watch

jpm-addon-watch is a small wrapper around jpm and jpm-addon which mount your addon and livereload your addon when a watched file (your addon's package.json file by default) changes.

Install

Installing from npm:

git clone https://github.com/rpl/jpm-addon-watch
cd jpm-addon-watch
npm install
sudo npm link

Then the new executable (jpm-addon-watch) will be available to you.

Usage

jpm-addon-watch has two command (run-mount, run-xpi) which supports most of the jpm options (which will be used by the wrapped jpm under the hood) and a couple of new one:

run-mount

run-xpi

Examples

run-mount

Mount and Watch the current addon with Firefox Nightly on OSX:

jpm-addon-watch run-mount -b /Applications/FirefoxNightly.app

Mount and Watch a specified addon path (with Firefox Nightly on OSX):

jpm-addon-watch run-mount -b /Applications/FirefoxNightly.app /path/to/myaddon

Force addon reload by updating mtime on the watched file:

touch /path/to/myaddon/package.json

run-xpi

Generate your addon xpi:

jpm xpi

Install and watch the generated addon xpi:

jpm-addon-watch run-xpi -b /Applications/FirefoxNightly.app

Force addon reload by regenerating the watched xpi file:

jpm xpi