Yeoman generator to create a workspace for userscript easily.
- Node.js >= 12
- Modern syntax
- JavaScript ESNext or TypeScript
- JSX for DOM powered by @violentmonkey/dom
- CSS
- CSS modules (only applied for
.module.cssfiles) - tailwindcss is enabled by default, but only for CSS, don't use it in JavaScript or templates
- CSS modules (only applied for
Read this for more details.
$ mkdir my-script
$ cd my-script
# Remove npx cache if needed
$ NPM_CACHE=`npm config get cache` # -> `~/.npm`
$ rm -rf $NPM_CACHE/_npx
# Use the latest version from git
$ npx -p https://github.com/violentmonkey/generator-userscript.git -p yo yo @violentmonkey/userscript