Nanotechnology Promises Much

    rollup-plugin-userscript

    0.1.1 • 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(
        path.resolve('src/meta.js'),
        meta => meta
          .replace('process.env.VERSION', pkg.version)
          .replace('process.env.AUTHOR', pkg.author),
      ),
    ];

    Install

    npm i rollup-plugin-userscript

    DownloadsWeekly Downloads

    10

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    20.2 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar