violentmonkey / generator-userscript

A yeoman generator to create a userscript project rapidly
95 stars 5 forks source link

@violentmonkey/generator-userscript

NPM

Yeoman generator to create a workspace for userscript easily.

Prerequisites

Features

Read this for more details.

Get Started

First of all, make a new directory for your userscript.

$ mkdir my-script
$ cd my-script

Then follow one of the options below to create the files.

Option 1: npm

Please make sure your npm is up to date because in earlier versions (e.g. 8.12.x) there was a bug that prevented npx from installing the correct dependencies.

$ npm i npm -g

# Use the latest version from git
$ npx -p github:violentmonkey/generator-userscript -p yo yo @violentmonkey/userscript

Option 2: pnpm

$ pnpm --package github:violentmonkey/generator-userscript --package yo dlx yo @violentmonkey/userscript