Yeoman generator for building userscripts with TypeScript and Webpack
MIT License
Yeoman generator for building userscripts with TypeScript and Webpack
First, install Yeoman and generator-userscript using npm (we assume you have pre-installed node.js).
npm install -g yo
npm install -g generator-userscript
Then generate your new project:
yo userscript
src/meta.json
.
meta.schema.json
JSON schema.include
property with rules to be run only on pages the script supports.src/index.ts
. You can split your code to modules and include them with an import
directive.src/index.css
or any other CSS file imported into src/index.ts
.
webpack.config.ts
file.dest/
directory.npm build
in the Node.js command propmt.npm build:prod
in the Node.js command propmt.MIT © Dark Daskin