We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1efcf61 commit b0e2b46Copy full SHA for b0e2b46
1 file changed
README.md
@@ -7,3 +7,21 @@
7
Automatically parse metadata and set `@grant`s.
8
9
With this plugin, `@grant`s for [`GM_*` functions](https://violentmonkey.github.io/api/metadata-block/) will be added at compile time.
10
+
11
+## Usage
12
13
+Add the plugin to rollup.config.js:
14
15
+```js
16
+import userscript from 'rollup-plugin-userscript';
17
18
+const plugins = [
19
+ // ...
20
+ userscript(
21
+ path.resolve('src/meta.js'),
22
+ meta => meta
23
+ .replace('process.env.VERSION', pkg.version)
24
+ .replace('process.env.AUTHOR', pkg.author),
25
+ ),
26
+];
27
+```
0 commit comments