Rammgako / Bauchan

The complex of browser extension and scripts based on "Native messaging" (see https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging) for running scripts or application on a host from web browser.
Apache License 2.0
0 stars 0 forks source link

Build and sign WebExtension from setup.py #2

Open ghost opened 5 years ago

ghost commented 5 years ago

Mozilla's web-ext allows to build and sign the WebExtension automatically. Let's have a custom setup.py command for that named build_webextension.

Running of this command should result in the .xpi filed generated under the dist directory. All intermediate files should be located within build/ directory.

ghost commented 5 years ago

Looks like it would be easier to build extension in its own extension/ subdirectory and then move the artifact into build/. Thanks to npm has node_modules hardcoded

ghost commented 5 years ago

Added a way to run Firefox with the extension buy executing npm run run so it would open /examples/echo/index.html.

Next: improve example to the point when it would be easy to run. Following step is to publish an extension with the example.