Create your own Firefox add-on

Add-On getting started :

1. To create Firefox add-ons using sdk:
a. Firefox version 38 or later
b. command-line jpm tool
2. Once jpm is installed, run the following command to initialize new add-on (first change the directory to the desired project folder using cd command)
jpm init
3. When you run jpm init command it will ask you values for multiple properties which ultimately would be added to the package.json. Following are the properties that it will ask you values for:

  title: (My Jetpack Addon) jsinfer-addon
  name: (jsinfer-addon)
  version: (0.0.1)
  description: (A basic add-on)
  entry point: (index.js)
  author: Yogesh Dixit
  engines (comma separated): (firefox,fennec)
  license: (MIT)
  JPM [info] About to write to C:\your add-on directory\package.json:

  Is this ok? (yes) yes

4. Once done it will write all the info provided in the package.json.
Your package.json should look somewhat like this:

   "title": "jsinfer-addon",
   "name": "jsinfer-addon",
   "version": "0.0.1",
   "description": "add-on for JS type inference",
   "main": "index.js",
   "author": "Yogesh Dixit",
   "engines": {
     "firefox": ">=38.0a1",
     "fennec": ">=38.0a1"
   "license": "MIT",
   "keywords": [

5. Congratulations, we have created our first Mozilla add-on. Now we can run our add-on using the following command:

  jpm run

6. Reference (

Installing JPM:

1. jpm is distributed using node package manager (npm)
2. Install Node from (, which includes npm
3. Once npm is installed, install jpm locally or globally using following commands,
a. npm install jpm –global (to install globally)
b. npm install jpm (to install locally)
4. to test the successful installation of jpm, run jpm command on a command line. You should be able to see all the available jpm commands.
5. If you have installed jpm locally then you need to add “/node_modules/.bin/” directory to your PATH variable.
6. On windows you can do this by going to My Computer > properties >  advanced system settings > Environment Variables > add the directory path to the end of the current path
7. restart your system once step 6 is performed


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s