Jetpack Manager for Node.js
Replacing the previous python tool for developing Firefox Add-ons, cfx, jpm is a utility for developing, testing, and packaging add-ons.
Currently only works with Firefox 34 (requires build from August 10th or later). Check out the --binary flag for ensuring that you're using the correct release of Firefox with jpm.
Installing from npm:
npm install jpm -g
Installing from GitHub to get latest features or working on jpm itself, use npm link to add the jpm global to your path:
git clone https://github.com/mozilla/jpm.git
cd jpm
npm install
npm link
jpm has several commands: run, xpi, init, test, with details below. Some options are:
-b, --binary <path>Use the specified Firefox binary to run the addon. Used inrunandtest.-v, --verbosePrints additional debugging information.--binary-args <CMDARGS>Passes the additional arguments into Firefox. Multiple arguments must be enclosed in quotes.--debugEnable the add-on debugger when running the add-on.-p, --profile <PROFILE>Uses the profile name or path when running Firefox. Paths must start with either "./" or "/", or otherwise assumed to be a profile name.-o, --overload [path]Uses either the specified[path]or the path set in the environment variablesJETPACK_ROOTas the root for addon-sdk modules instead of the ones built into Firefox.
jpm initProvides a series of prompts to create apackage.jsonfor an addon.jpm runRuns the current addon.jpm testTests the current addon.jpm xpiZips up the current addon into a.xpifile.
Run current addon with Firefox Nightly on OSX:
jpm run -b /Applications/FirefoxNightly.app
Turn current addon into a .xpi file for deployment and installation
jpm xpi
Use local checkout of SDK modules for working on the SDK itself.
jpm run -o /path/to/addon-sdk
Currently, any add-on with unspecified engines, or engines supporting versions of Firefox where AOM support for native jetpacks does not exist, jpm will add a install.rdf and bootstrap.js file for backwards compatability. This can be overridden with the --force-aom flag, which will not build with these additional files. This is mainly for testing AOM support while still in development.
To run the jpm test suite
npm test
To run just a specific type of test (functional, unit), run the associated script:
npm run unit
MPL 2.0