Skip to content

Commit

Permalink
create readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
waymondrang committed Feb 17, 2022
1 parent 093b75b commit bc39aad
Showing 1 changed file with 113 additions and 0 deletions.
113 changes: 113 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
## Extension Builder

A bundle of scripts for automated packaging of browser extensions for multiple platforms.

## Settings

```json
{
"project_name_short": "extbuild",
"enforce_version_control": true,
"clean_manifest": true,
"default_actions": ["copy"],
"release_directory": "../releases",
"source": {
"directory": "../src/chrome",
"platform": "chrome"
},
"targets": [
{
"directory": "../src/firefox",
"platform": "firefox",
"manifest_version": 2,
"patch": [],
"temp": true
}
],
"git_messages": {
"directory_sync": "automated directory sync",
"packages": "automated package build"
},
"debug": false
}
```

## `project_name_short`

The extension's short/abbreviated name.

#### Example

`dad`, `pur`, or `extbuild`.

## `enforce_version_control`

If set to `true`, the program will check if a package already exists for the extension's current version. You can temporarily override this by using the `--force` option.

## `clean-manifest`

If `true`, the program will remove any empty fields in the manifest, including empty objects, arrays, and strings.

## `default_actions`

An array of actions that will run on every invocation.

#### Options

`copy`

This will sync the target (excluding `temp` enabled) directories with the source directory, adjusting any patch files and manifest fields.

`package`

This will create packages for the source and target (including `temp` enabled) directories.

`git`

This will push to GitHub after every action with automated messages configured in `build_config.json`.

## `release_directory`

The relative path of the release directory, where packages will be created. If the directory does not exist, it will be created.

## `source`

An object containing information on the source directory.

### `directory`

The relative path of the source directory. This path must exist and contain a `manifest.json` file.

### `platform`

The platform of the source directory. Supports `chrome` and `firefox`.

## `targets`

An array of objects containing information on the build targets.

### `directory`

The relative path of the source directory. If `temp` is `true`, this will be the relative path of the temporary directory. If the directory does not exist, one will be created.

### `platform`

The platform of the target. Supports `chrome`, `firefox`, `opera`, and `edge`.

### `manifest_version`

The manifest version of the target.

### `patch`

Array of files to patch. Patches version and platform-specific methods, including changing `chrome` to `browser` for Firefox and `browserAction` to `action` for sync between manifest V2 and V3.

`manifest.json` files will be synced by default, it does not need to be included in `patch`.

### `temp`

If `true`, the target directory will only be created if the package action is invoked, in which the directory will be removed after the process has finished.

## `git_messages`

Commit messages used when the git action is invoked.

0 comments on commit bc39aad

Please sign in to comment.