Go Back to projects

tsup-problem-matchers

Inspired by esbuild-problem-matchers

Builtin Problem Matchers

📚 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"
    }
  ]
}



{
  "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.