VSCode Setting $ Parameter for?

I ask because I do not know if this is possible. But I use VSCode to run multiple makefiles.

My .json tasks:

{
"version": "0.1.0",
"command": "sh",
"args": ["-c"],
"isShellCommand": true,
"showOutput": "always",
"suppressTaskName": true,
"tasks": [
    {
        "taskName": "CTRL + SHIFT _ B",
        "isBuildCommand": true,
        "args": ["$make run-db"]
    },
    {
        "taskName": "run",
        "args": ["make -C ${fileDirname} run;"]
    },
    {
        "taskName": "install",
        "args": ["make -C ${fileDirname} install;"]
    },
    {
        "taskName": "test",
        "args": ["make -C ${fileDirname} test;"]
    }
]
}

I would like to know if it is possible to create only one make make line, instead of creating one method for each task in my make file, I just pass an additional argument to the vscode command pin (EX: ctrl + p make install task)

{
    "taskName": "make",
    "args": ["make -C ${fileDirname} $Method;"]
},
+4
source share
1 answer

you can use environment variable

"env": {
     "NODE_ENV": "development"
},

as in this example

0
source

Source: https://habr.com/ru/post/1659416/


All Articles