项目作者: alexandre-abrioux

项目描述 :
Speed up the distribution of self-hosted webextensions in Firefox.
高级语言: PHP
项目地址: git://github.com/alexandre-abrioux/webextension-helper.git
创建时间: 2018-08-14T10:18:12Z
项目社区:https://github.com/alexandre-abrioux/webextension-helper

开源协议:

下载


webextension helper

Speed up the distribution of self-hosted Firefox webextensions

  • provides a lightweight web service to serve your JSON update manifest ;
  • ease the usage of web-ext via a simple docker image
    to sign your webextension on AMO

Dependencies

This tool relies on docker and docker-compose.
See https://docs.docker.com/compose/install/

Some shortcuts are provided by a Makefile.
You will need make to use them, but the tool is not mandatory.

Installation

  • navigate to your webextension’s project directory
  1. cd /home/<username>/dev/webextension
  • move all sources to a new subdirectory src.
    If you already used the web-ext npm package in this directory before you should also move your add-on id file.
  1. mkdir src
  2. mv !(src) src
  3. [ -f .web-extension-id ] && mv .web-extension-id src
  • clone this repository as a submodule of the webextension
  1. git submodule add git@github.com:alexandre-abrioux/webextension-helper.git helper
  1. cp helper/.env.dist helper/.env
  2. vim helper/.env

Signing your Web-Extension

Simply run make sign.

Updating Mozilla’s web-ext Tool

To rebuild the web-ext docker image you can run make update.

Enabling Auto-Updates

  • configure your webextension’s manifest file to target the update.php script
  1. "applications": {
  2. "gecko": {
  3. "update_url": "https://webextension-helper.example.com/updates.php"
  4. }
  5. }
  • use the docker-compose.yml file to start the web service on your server
  1. make up

Makefile

Some shortcuts are configured in a Makefile. Use make help for more information.

  • make help
  • make build
  • make up
  • make stop
  • make down
  • make restart
  • make sign
  • make update