JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 68
  • Score
    100M100P100Q77166F
  • License MIT

Rollup plugin for userscript

Package Exports

  • rollup-plugin-userscript

Readme

rollup-plugin-userscript

NPM License Downloads

Automatically parse metadata and set @grants.

With this plugin, @grants for GM_* functions will be added at compile time.

Usage

Add the plugin to rollup.config.js:

import userscript from 'rollup-plugin-userscript';

const plugins = [
  // ...
  userscript(
    path.resolve('src/meta.js'),
    meta => meta
      .replace('process.env.VERSION', pkg.version)
      .replace('process.env.AUTHOR', pkg.author),
  ),
];