vscode-tasks-engine
v0.1.0
Published
`vscode-tasks-engine` is a host-agnostic TypeScript library for parsing, validating, resolving, and running the supported custom-task subset of VS Code workspace `tasks.json` files.
Readme
vscode-tasks-engine
Purpose
vscode-tasks-engine is a host-agnostic TypeScript library for parsing, validating, resolving, and running the supported custom-task subset of VS Code workspace tasks.json files.
It owns task semantics such as JSONC parsing, override merging, dependency orchestration, and cancellation. It does not own terminal UI or process-management strategy.
Installation
pnpm add vscode-tasks-engineQuick Example
import { readFileSync } from 'node:fs'
import { analyzeTaskDocument, parseTaskDocument } from 'vscode-tasks-engine'
const sourcePath = '.vscode/tasks.json'
const text = readFileSync(sourcePath, 'utf8')
const document = parseTaskDocument(text, sourcePath)
const analysis = analyzeTaskDocument(document)
for (const task of analysis.tasks) {
const status = task.supported ? 'supported' : `unsupported: ${task.unsupportedReason}`
console.log(`${task.label ?? task.id}: ${status}`)
}Documentation Map
- Concepts and recommended usage: docs/context.md
- Minimal inspection workflow: examples/analyze-tasks.ts
- End-to-end smoke demo: examples/e2e-demo.ts
- Host integration for direct process tasks: examples/run-process-task.ts
- Exact generated API surface after build: dist/index.d.mts
