VsCode - Task (tasks.json)

1 - Location

tasks.json file in the workspace .vscode folder

3 - Shortcut

  • Ctrl+Shift+B (Run Build Task)
  • Terminal > Configure Tasks > Create tasks.json file from templates > Others

4 - Example

4.1 - Run a command


{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "echo",
            "type": "shell",
            "command": "echo Hello"
        }
    ]
}

4.2 - Run a npm script

NPM - Script


{
    // See https://go.microsoft.com/fwlink/?LinkId=733558 
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "type": "npm",
            "script": "test",
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

4.3 - Run Typescript

<file javascript tasks.json> { See https://go.microsoft.com/fwlink/?LinkId=733558 for the documentation about the tasks.json format“version”: “2.0.0”,“tasks”: [ {“label”: “sh”, “type”: “shell”,“command”: “tsc -w -p .”, “group”: {“kind”: “build”, “isDefault”: true} }] } </code>


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap