rollup-plugin-userscript
TypeScript icon, indicating that this package has built-in type declarations

0.3.7 • Public • Published

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(meta => meta.replace('process.env.AUTHOR', pkg.author)),
];

Import the metadata file with a suffix ?userscript-metadata in your script:

import './meta.js?userscript-metadata';

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.1-0.00alpha
0.3.7103latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.7103
0.3.60
0.3.50
0.3.40
0.3.30
0.3.218
0.3.10
0.3.00
0.2.10
0.2.00
0.1.1-0.00
0.1.15
0.1.00

Package Sidebar

Install

npm i rollup-plugin-userscript

Weekly Downloads

126

Version

0.3.7

License

MIT

Unpacked Size

7.95 kB

Total Files

6

Last publish

Collaborators

  • gera2ld
  • vm-dev