webext-buildtools-integrated-builder

Complete solution to build and deploy your Web Extension

Usage no npm install needed!

<script type="module">
  import webextBuildtoolsIntegratedBuilder from 'https://cdn.skypack.dev/webext-buildtools-integrated-builder';
</script>

README

Build Status

Introduction

This package for Node.js provides complete solution to build and deploy your Web Extension.

It includes several builders for building/deploying Web Extension for different targets/platforms:

  1. Pack to zip file (DirReaderBuilder)
  2. Pack to signed crx file and generate update.xml file for offline distribution of Chrome extension (ChromeCrxBuilder)
  3. Upload and publish on Chrome Web Store, save published crx (ChromeWebstoreBuilder)
  4. Deploy to Firefox Add-ons, sign xpi for offline distribution (FirefoxAddonsBuilder)

Also there is OperaAddonsUploadBuilder which stays apart and isn't included to this package because of it's experimental status.

Installation

npm install webext-buildtools-integrated-builder

Usage

The most simple way to start build is to call startBuild function and pass all required params as one object:

const startBuild = require('webext-buildtools-integrated-builder').startBuild;
const options = {...}; // you can retrieve json object here
startBuild(options);

To easily make options object you can use:

Secrets

options object has substituteEnvVariables flag which enables substitution of $(ENV_NAME) strings inside config to corresponding environment variables (for usage in CI pipelines)

Advanced usage

Main class of this package is IntegratedBuilder, you can use it directly to customize your build and get more control over build process. Read integratedBuilder.md for details.

If you interested in details or in developing your own builder, please go to webext-buildtools-builder-types repo.