Skip to content

Commit

Permalink
chore: add default VSCode build task (#4822)
Browse files Browse the repository at this point in the history
Changes the default VSCode build command to run `cargo fmt` and `cargo
test --no-run`. This can be easily run with `Cmd+B` (or `Ctrl+B` for
Windows users).
  • Loading branch information
DonIsaac authored Aug 11, 2024
1 parent 4e818a4 commit 28bfc12
Showing 1 changed file with 50 additions and 10 deletions.
60 changes: 50 additions & 10 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,49 @@
{
"version": "2.0.0",
"tasks": [
// format code, then build tests (but do not run them).
{
"label": "rust: cargo test --no-run",
"type": "cargo",
"command": "test",
"args": [
"--no-run"
],
"problemMatcher": [
"$rustc"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"dependsOn": [
"rust: cargo fmt"
]
},
{
"type": "cargo",
"command": "fmt",
"problemMatcher": [
"$rustc"
],
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false
},
"label": "rust: cargo fmt"
},
{
"type": "npm",
"script": "compile",
Expand All @@ -18,19 +61,16 @@
{
"type": "shell",
"command": "cd ./editors/vscode && npm run watch",
"windows": {
"command": "cd ./editors/vscode; npm run watch",
},
"label": "watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
"windows": {
"command": "cd ./editors/vscode; npm run watch"
},
"label": "watch",
"isBackground": true,
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
}
}
]
},
],
}

0 comments on commit 28bfc12

Please sign in to comment.