tsup-problem-matchers
September 15, 2024 ยท View on GitHub
Inspired by esbuild-problem-matchers
Builtin Problem Matchers
$tsup- Matches errors and warnings fromtsup --format esm,cjsoutput$tsup-watch- Matches errors and warnings fromtsup --format esm,cjs --watchoutput$tsup-esm- Matches errors and warnings fromtsup --format esmoutput$tsup-esm-watch- Matches errors and warnings fromtsup --format esm --watchoutput$tsup-cjs- Matches errors and warnings fromtsup --format cjsoutput$tsup-cjs-watch- Matches errors and warnings fromtsup --format cjs --watchoutput$tsup-dts- Matches errors and warnings fromtsup --dtsoutput$tsup-dts-watch- Matches errors and warnings fromtsup --dts --watchoutput
๐ Usage
To use this, add the tsup or tsup-watch problem matcher to your tasks.json, as appropriate. For example:
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"group": "build",
"problemMatcher": ["$tsup-watch", "$tsup-dts-watch"],
"isBackground": true,
"label": "npm: watch"
},
{
"type": "npm",
"script": "build",
"group": "build",
"problemMatcher": ["$tsup", "$tsup-dts"],
"label": "npm: build"
}
]
}
Note
If you are using Turborepo, you can use the following configuration
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"group": "build",
"problemMatcher": [
{
"base": "$tsup-watch",
"background": {
"beginsPattern": "^your-pkg-name:(.*): (ESM|CJS) Build start$",
"endsPattern": "^your-pkg-name:(.*): (ESM|CJS) .* Build success|^your-pkg-name:(.*): (ESM|CJS) Build failed"
}
},
{
"base": "$tsup-dts-watch",
"background": {
"beginsPattern": "^your-pkg-name:(.*): DTS Build start$",
"endsPattern": "^your-pkg-name:(.*): DTS .* Build success|^your-pkg-name:(.*): DTS Build failed"
}
}
],
"isBackground": true,
"label": "npm: watch"
}
]
}
๐ License
Published under MIT License.