README
bsb-vscode-task-adaptor
A small Node.js script that reads the output from BuckleScript build tool (bsb
) and adapts it so it can be consumed from vscode
tasks, so they appear in the "Problems" panel of vscode
that shows project diagnostics.
Getting started
- Install the adaptor:
npm install --save-dev bsb-vscode-task-adaptor
or with yarn
:
yarn add bsb-vscode-task-adaptor --dev
- Create a file
tasks.json
in.vscode
folder:
{
"version": "2.0.0",
"tasks": [
{
"label": "bsb watch",
"command": "npx",
"type": "shell",
"args": ["parse-bsb", "bsb -make-world -w"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"isBackground": true,
"problemMatcher": {
"fileLocation": "absolute",
"owner": "ocaml",
"background": {
"activeOnStart": true,
"beginsPattern": ">>>> Start compiling",
"endsPattern": ">>>> Finish compiling"
},
"pattern": [
{
"regexp": "^File \"(.*)\", lines (\\d+)-(\\d+)(?:, characters (\\d+)-(\\d+))?: