Build Custom extension
Bepp includes a functionality to package extensions for custom browser. This feature streamlines the process and allows developers to extend their extensions to other browsers not available in bepp with ease.
Prerequisites
- BEPP installation How to
Usage
bepp build-custom [options]
/**
* Build Custom extension.
*
* @see https://bepp.pigeonposse.com/
* @see https://bepp.pigeonposse.com/guide/lib/build/custom
*/
import {custom, buildBrowser} from '@bepp/bepp'
custom.build({
/** options **/
})
// Alternative:
buildBrowser('custom',{
/** options **/
})
Options
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 theid
option.browser
takes the browser's identification name.
- CLI option:
-f
--filename
- JS key:
filename
- Type:
string
- Default:
{{id}}-{{browser}}-{{version}}
browserName
Specify browser name for use in filename
option.
- Option in CLI:
--b
--browser-name
- Key in JavaScript:
browserName
- Type:
string
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
Examples
bepp build-custom \
--input "/my/chromium/path" \
--browser-name "vivaldi" \
--id "my-extension-name"
/**
* Build Custom extension.
*
* @see https://bepp.pigeonposse.com/
* @see https://bepp.pigeonposse.com/guide/lib/build/custom
*/
import {custom, buildBrowser} from '@bepp/bepp'
custom.build({
input: '/my/chromium/path',
brwoserName: 'vivaldi',
id: 'my-extension-name'
})
// Alternative:
buildBrowser('custom',{
input: '/my/chromium/path',
brwoserName: 'vivaldi',
id: 'my-extension-name'
})