An open API service indexing awesome lists of open source software.

https://github.com/keisukeyamashita/chrome-extension-archive-webpack-plugin

Webpack plugin to create archive for Chrome Web Store
https://github.com/keisukeyamashita/chrome-extension-archive-webpack-plugin

Last synced: 6 months ago
JSON representation

Webpack plugin to create archive for Chrome Web Store

Awesome Lists containing this project

README

          





# chrome-extension-archive-webpack-plugin

[![npm version][npm-version]][npm-url]

> Create Chrome Extension archive for submitting to Chrome Web Store

## Installation

```console
npm i --save-dev html-webpack-plugin
```

```console
yarn add --dev html-webpack-plugin
```

## Options

| Name | Type | Default | Description |
|-------------|-----------|--------------------|------------------------------|
| `algorithm` | `string` | `zip` | The compression algorithm |
| `filename` | `string` | `directory` option | Name of the archive |
| `directory` | `string` | `undefined` | Path to the target directory |
| `to` | `string` | `.` | Output path |
| `verbose` | `boolean` | `false` | Outputs logs to console |

## Usage

### Basic

```javascript
import { ChromeExtensionArchiveWebpackPluginOptions } from 'chrome-extension-archive-webpack-plugin'

modules.exports = {
plugins: [
// This will create `build.zip` in current directory
new ChromeExtensionArchiveWebpackPluginOptions({
directory: 'build'
})
]
}
```

### Archive `build` directory

```javascript
import { ChromeExtensionArchiveWebpackPluginOptions } from 'chrome-extension-archive-webpack-plugin'

modules.exports = {
plugins: [
// This will create `build.zip` from `build/` to `build/`
new ChromeExtensionArchiveWebpackPluginOptions({
directory: 'build',
to: 'build'
})
]
}
```

### Change filename

```javascript
import { ChromeExtensionArchiveWebpackPluginOptions } from 'chrome-extension-archive-webpack-plugin'

modules.exports = {
plugins: [
// This will create `myzip.zip` in current directory
new ChromeExtensionArchiveWebpackPluginOptions({
directory: 'build',
filename: 'myzip'
})
]
}
```

## License

[MIT](./LICENSE)

[npm-version]: https://badge.fury.io/js/chrome-extension-archive-webpack-plugin.svg
[npm-url]: https://badge.fury.io/js/chrome-extension-archive-webpack-plugin