chrome-manifest-sync-webpack-plugin

1.0.1 • Public • Published

Webpack plugin to keep extension's manifest file in sync with package.json.

Installation

npm install --save-dev chrome-manifest-sync-webpack-plugin

Available config options

  • source - path to your manifest.json.

    Default: './manifest.json'

  • properties - array of properties to copy.

    Default:

    [
        'version',
        'description',
        'author',
        // Copies `homepage` from `package.json`
        // to `homepage_url` in `manifest.json`
        { homepage_url: 'homepage' },    
    ]

Webpack configuration

const { ChromeManifestSyncWebpackPlugin } = require('chrome-manifest-sync-webpack-plugin');

module.exports = {
    // ...
    plugins: [
        // ...
        new ChromeManifestSyncWebpackPlugin({
            source: './src/manifest.json',
            properties: [ 'version', 'description' ],
        }),
        // ...
    ],
    // ...
};

Now, every time you save changes to package.json or src/manifest.json, Webpack will emit updated manifest to your output directory.

Package Sidebar

Install

npm i chrome-manifest-sync-webpack-plugin

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

7.21 kB

Total Files

4

Last publish

Collaborators

  • lazyhammer