Package Exports
- @nemoinho/greasemonkey-header-plugin
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nemoinho/greasemonkey-header-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
GreasemonkeyHeaderPlugin
A plugin to simply add userscript-headers via webpack.
Installation
npm i --save-dev @nemoinho/greasemonkey-header-pluginUsage
As this is a webpack-plugin you need webpack to use this script.
To enable the plugin you configure it as follows in your webpack.config.js:
const GreasemonkeyHeaderPlugin = require('@nemoinho/greasemonkey-header-plugin');
const pkg = require('./package');
module.exports = {
entry: 'index.js',
output: {
filename: 'bundle.user.js',
path: path.resolve(__dirname, 'dist')
},
plugins: [
new GreasemonkeyHeaderPlugin({
name: 'My awesome',
author: 'Joe Dow',
description: 'My awesome userscript',
include: '/^https?:\\/\\/example.com\\/.*/',
version: pkg.version,
grant: 'none'
})
]
}The given options are all translated to user-script tags but at least name and include are necessary.