5

I've gone over the Mozilla Developer Network "Getting Started (jpm)" guide to getting started with Firefox add-on development.

This guide suggests that to see the effects of changes that I make to my add-on's code I need to:

  1. Close Firefox
  2. Rebuild the add-on.
  3. Run it in Firefox again.

Do I really have to rebuild my package and run it a new instance of Firefox to see my changes?

Is there an alternative way to refresh the add-on code from within the browser?

urig
  • 16,016
  • 26
  • 115
  • 184
  • 1
    Why not: "jpm xpi" + [Extension Auto Installer](https://addons.mozilla.org/en-US/firefox/addon/autoinstaller/). You can then use gulp (or just nodejs, for that matter) on top of that to automate the build and reloading in the browser. Looking fwd to hear how Noitidart and others approach this.. – cviejo Nov 21 '15 at 20:27
  • @cviejo Tx. This works very nicely with jpm's watchpost feature: `jpm watchpost --post-url http://localhost:8888/`. Would you like to turn your comment into a full answer? – urig Nov 22 '15 at 14:25
  • Sure thing. Added the watchpost suggestion. – cviejo Nov 23 '15 at 10:04
  • @cviejo will leave it open for a couple of more days to see if more input comes in and will then accept. tx! – urig Nov 23 '15 at 12:03

1 Answers1

7

You can combine jpm with the Extension Auto Installer add-on like this:

jpm post --post-url http://localhost:8888/

Or using watchpost to automate the process:

jpm watchpost --post-url http://localhost:8888/ 
cviejo
  • 4,388
  • 19
  • 30