🤹♂️Task oluşturma ve birbirine bağlama | VS Code
VSCode, tasks.json ile task oluşturma ve birbirine bağlama
{
"version": "2.0.0",
"tasks": [
{
"label": "build and run",
"type": "shell",
"command": "npm run build",
"args": [],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
},
"dependsOn": ["build"],
"dependsOrder": "sequence",
"presentation": {
"echo": false,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true,
"close": true
},
},
{
"label": "build",
"type": "shell",
"command": "npm run build",
"args": [],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": []
},
{
"label": "run",
"type": "shell",
"command": "npm run start",
"args": [],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": []
}
]
}
dependsOn
komutu ile diğer taskları çalıştırabilirizsequence
ardışık olarak taskları çalıştırır
presentation
iletask
ın çalışma şekilini ayarlarızSessiz bir çalışma için
"presentation": { "echo": false, "reveal": "silent", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": true, "close": true },
kind
yapısı ile grup belirleriz, bu sayede kısayollarla hızlıca kullanabilirizbuild
grubunun kısayolu $⌘⇧B$isDefault
ile de direkt çalışmasını sağlarızYapmazsak,
build
tasks
arasından seçim yapmamızı ister
"group": { "kind": "build", "isDefault": true },
📑 References
“vscode task that use two command” → ChatGPT
Last updated
Was this helpful?