Skip to content

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

License

Notifications You must be signed in to change notification settings

lazyhammer/chrome-manifest-sync-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published