A Rollup plugin for defining userscript metadata blocks, suitable for use with Tampermonkey, Violentmonkey, and other userscript managers.
- Define userscript metadata blocks in your Rollup build
- Automatically generates the
@grant
metadata based on the GM API functions used - Compatible with Tampermonkey, Violentmonkey, and more
npm install @editor-x/rollup-plugin-userscript --save-dev
Add the plugin to your rollup.config.js
:
import userscript from '@editor-x/rollup-plugin-userscript';
export default {
// ...your config
plugins: [
userscript({
// plugin options
})
]
};
MIT