Skip to content

Build chromium extension

Package your chromium extensions quickly. compatible for Manifest V3 and Manifest V2

Prerequisites

Usage

bash
bepp build-chromium [options]
js
/**
 * Build Chromium extension.
 * 
 * @see https://bepp.pigeonposse.com/
 * @see https://bepp.pigeonposse.com/guide/lib/build/chromium
 */
import {chromium, buildBrowser} from '@bepp/bepp'

chromium.build({
    /** options **/
})

// Alternative:
buildBrowser('chromium',{
    /** options **/
})

Options

input

Specify the input directory for the extension.

Note

The input directory must be a directory path for a Chromium extension with Manifest 3.

The provided path should point to the directory containing the necessary files for building the extension.

  • CLI option: -i --input
  • JS key: input
  • Type: string

id

Identification for build. Used in filename build. The id option allows you to provide an identification string for the build. This identifier is used in the filename during the build process.

  • CLI option: --id
  • JS key: id
  • Type: string
  • Default: bepp

output

Specify the output directory where the packaged extension will be stored.

  • CLI option: -o --output
  • JS key: output
  • Type: string
  • Default: build/extensions

compress

Compression format for packaging Choose the compression format for packaging the extension.

  • CLI option: -c --compress
  • JS key: compress
  • Type: tar tgz gzip zip
  • Default: tgz

filename

Define the template for the filename of the packaged extension.

Filename placeholders

The filename can include placeholders such:

  • version takes the version number of the extension manifest.
  • id takes the id set by the id option.
  • browser takes the browser's identification name.
  • CLI option: -f --filename
  • JS key: filename
  • Type: string
  • Default: {{id}}-{{browser}}-{{version}}

verbose

Use verbose output.

  • CLI option: -v --verbose
  • JS key: verbose
  • Type: boolean

time

Print execution time.

  • CLI option: -t --time
  • JS key: time
  • Type: boolean

exit

Force exit from process on error.

  • CLI option: -e --exit
  • JS key: exit
  • Type: boolean