continue-custom/.vscode/tasks.json
2024-04-01 19:52:34 -07:00

159 lines
4.2 KiB
JSON

{
"version": "2.0.0",
"tasks": [
// Compile and bundle the extension
{
"label": "vscode-extension:build",
"dependsOn": [
// To detect compile errors
"vscode-extension:tsc",
// To build the React app that is used in the extension
"vscode-extension:continue-ui:build",
// To bundle the code the same way we do for publishing
"vscode-extension:esbuild",
// Start the React app that is used in the extension
"gui:dev"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "vscode-extension:esbuild",
"type": "npm",
"script": "esbuild-watch",
"path": "extensions/vscode",
"isBackground": true,
"problemMatcher": [
{
"pattern": [
{
"regexp": "> (.*?):([0-9]+):([0-9]+): (warning|error): (.+)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ">",
"endsPattern": ">"
}
}
]
},
// Tsc currently errors out due to testing setup issues, will be resolved in a different PR
// This will be useful for preventing debugging if there are compile errors
{
"label": "vscode-extension:tsc",
"type": "npm",
"script": "tsc",
"path": "extensions/vscode",
"problemMatcher": ["$tsc"],
"presentation": {
"revealProblems": "onProblem",
"clear": true
}
},
// Build the React app. It gets bundled into the extension as a file resource and has a seprate build step
{
"label": "vscode-extension:continue-ui:build",
"type": "shell",
"command": "node",
"args": ["${workspaceFolder}/extensions/vscode/scripts/prepackage.js"],
"problemMatcher": ["$tsc"],
"presentation": {
"revealProblems": "onProblem",
"clear": true
},
"options": {
"cwd": "${workspaceFolder}/extensions/vscode"
}
},
//
// Compile and bundle tests
{
"label": "vscode-extension:tests:build",
"dependsOn": [
// Build the extension
"vscode-extension:build",
// To detect compile errors - this type checks both the extension and the tests
"vscode-extension:tsc",
"vscode-extension:tests:esbuild"
]
},
{
"label": "vscode-extension:tests:esbuild",
"type": "npm",
"script": "build-test",
"path": "extensions/vscode",
"problemMatcher": [
{
"pattern": [
{
"regexp": "> (.*?):([0-9]+):([0-9]+): (warning|error): (.+)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
},
//
// Install or update all dependencies for all projects in the monrepo
{
"label": "install-all-dependencies",
"type": "shell",
"windows": { "command": "./install-dependencies.ps1" },
"command": "./install-dependencies.sh",
"problemMatcher": [] // Empty so users are not prompted to select progress reporting
},
//
// Start the React App for debugging with Vite
{
"label": "gui:dev",
"type": "shell",
"command": "npm",
"options": {
"cwd": "${workspaceFolder}/gui"
},
"args": ["run", "dev"],
"isBackground": true,
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": "."
}
}
]
},
//
// esbuild for the core binary
{
"label": "binary:esbuild",
"type": "shell",
"command": "npm",
"args": ["run", "esbuild"],
"problemMatcher": [],
"options": {
"cwd": "binary"
}
}
]
}