https://github.com/scrum/webpack-extension-manifest-plugin
Creates manifest json file based you config
https://github.com/scrum/webpack-extension-manifest-plugin
Last synced: over 1 year ago
JSON representation
Creates manifest json file based you config
- Host: GitHub
- URL: https://github.com/scrum/webpack-extension-manifest-plugin
- Owner: Scrum
- License: mit
- Created: 2017-12-05T13:14:44.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-29T11:18:48.000Z (almost 2 years ago)
- Last Synced: 2025-02-21T22:11:20.267Z (over 1 year ago)
- Language: JavaScript
- Size: 1.44 MB
- Stars: 23
- Watchers: 2
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Funding: .github/funding.yml
- License: license
Awesome Lists containing this project
README
# webpack-extension-manifest-plugin
> Creates manifest json file based on you config
[](https://github.com/Scrum/rexios/actions?query=workflow%3A%22CI+tests%22)[]()[](https://www.npmjs.com/package/webpack-extension-manifest-plugin)[](https://github.com/sindresorhus/xo)[](https://coveralls.io/r/Scrum/webpack-extension-manifest-plugin)
[](https://www.npmjs.com/package/webpack-extension-manifest-plugin)[](https://www.npmjs.com/package/webpack-extension-manifest-plugin)
## Why ?
Simplifies the development of cross-platform browser extension
- [x] Firefox
- [x] Chrome
- [x] EDGE
- [ ] Safari
## Install
```bash
npm i -D webpack-extension-manifest-plugin
```
> **Note:** This project is compatible with node v10+
## Usage
**baseManifest.js**
```js
export default {
name: 'my manifest'
};
```
**webpack.config.js**
```js
import WebpackExtensionManifestPlugin from 'webpack-extension-manifest-plugin';
module.exports = {
plugins: [
new WebpackExtensionManifestPlugin({
config: {
base: './baseManifest.js',
extend: {description: 'my description'}
},
pkgJsonProps: [
'version'
]
})
]
};
```
*Create manifest.json with extend configs `{name: 'my manifest', description: 'my description', version: '0.0.0'}`*
## Options
### `config`
Type: `Object`
Default: `{}`
Description: *Can take a ready-made configuration or filename (to fetch from) for the manifest file, or a set of parameters `base`, `extend` (both of which can be a filename or an object)*
### `minify`
Type: `Boolean`
Default: `false`
Description: *Controls if the output should be minified*
### `pkgJsonProps`
Type: `Array of strings`
Description: *Adds specified properties from your package.json file into the manifest*