As the transition to WebExtensions continues, we are also building tools to make developing them faster and easier than ever. Our latest is a command line tool called web-ext, which we released recently as an initial working version with some basic features.
We built it because we want developing extensions to be fast and easy. Just as Firefox’s WebExtensions API is designed for cross-browser compatibility, we want web-ext to eventually support platforms such as Chrome or Opera. We will continue developing jpm in parallel, as needed.
To give it a try, you can install it from npm:
npm install --global web-ext
When developing an extension, here’s how you can run it in Firefox to test it out:
cd /path/to/your/source
web-ext run
This is similar to how you can load your source directly on the about:debugging page.
When you’ve got your extension working, here’s how to build an XPI file that can be submitted to addons.mozilla.org:
web-ext build
You can also self-host your XPI file for distribution but it needs to be signed by Mozilla first. Here’s how to build and sign an XPI file:
web-ext sign
The end user documentation is a work in progress but you can reference all commands and options by typing:
web-ext --help
As you can see, this is a very early release just to get you started while we continue adding features. If you’d like to help out on the development of web-ext, check out the contributor guide and take a look at some good first bugs.
Paul Heil wrote on
kumar303 wrote on