Template for experimental Firefox WebExtensions that use libdweb APIs.
As of this writing libdweb is an experiment to enable dweb community and Mozilla to prototype dweb explorations as Firefox experimental WebExtensions.
WebExtensions that include experimental APIs like libdweb are meant for experimentation and come with set of restrictions:
- They can not be hosted on http://addons.mozilla.org/
- They can be only be installed on Firefox Developer Edition and Nightly builds.
- To try such an extension some preferences in about:config need to be changed.
There are many ways how such experiments can be built and distributed but this template provides opinionated configuration that can customized for more advanced use cases.
To get started fork or clone this template and install all the necessary toolchain via npm or yarn.
git clone [email protected]:libdweb/template.git
cd temlpate
npm install # or yarn
Template is setup such that it includes run
, test
and build
your experiment.
You can run web-extension by running
npm start
You can also run with some dev tooling by running
npm run dev
You can write test WebExtensions like one in the test
directory, which will run headless Firefox Nightly
npm test
You can build WebExtension by running following command
npm run build
Note: Will produce zip file in
web-ext-artifacts
directory
You can share your experiment with others, by sending a build artifact with your audience. They will be able to try it on Firefox Nightly and Developer Edition after performing several steps:
First they will need to set following preferences by navigating to about:config
xpinstall.signatures.required: false
extensions.legacy.enabled: true
Then they will need to navigate to about:addons
and install build artifact via "Install Add-On From File..." menu item.