Inserting header in your bundle JavaScript file.
npm
npm install --save-dev header-inserter
pnpm
pnpm add -D header-inserter
userscript
like this;
{
"name": "add badge for action link",
"namespace": "https://github.com/casaub0n",
"version": "0.1",
"description": "add badge for action link",
"author": "casaub0n",
"match": "https://github.com/*/*/actions*",
"grant": "none",
"sameversion": true
}
package.json
like this;
{
"name": "your-project",
"scripts": {
"build": "tsx build.ts && header-inserter dist/index.js"
},
"devDependencies": {
"header-inserter": "latest"
}
}
I compared zod to validbot by after builded files.
- validbot: 10314 bite
- zod: 64964 bite