Vscode: Add multiple task.json configuration files

Created on 5 Oct 2018  路  9Comments  路  Source: microsoft/vscode

Is there a current way to have multiple launch.json or tasks.json files?

It would be really nice to be able to have a user's custom launch.json/tasks.json for workspaces so that we could have our .vscode folder under version control so everyone has the same copy of the standard tasks/debug configurations while working on the project, but they could also have their own tasks/debug configurations without committing them or having unstaged changes floating around.

feature-request tasks

Most helpful comment

I would _love_ to combine multiple tasks.json (e.g. npm, gem, jekyll) in one big file. So I would avoid copy & paste issues. Or I can link / download my tasks from platforms like github and just reuse them.

Idea A: Just use all files with name *-tasks.json (or similar) as tasks.json from .vscode folder.

Idea B: Make the additional tasks.json files available as a embedded file.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "My NPM Tasks (with subfolder)",
            "fromFile": "./myTasks/npm/tasks.json"
        },
        {
            "label": "My Jekyll Tasks",
            "fromFile": "./myTasks/Jekylltasks.json"
        }
  ]
}

All 9 comments

No, this is currently not possible.

For launch.json you can have your own using workspace or user launch configuraiont
More details - use a multi root setup but just open your single folder https://code.visualstudio.com/docs/editor/multi-root-workspaces#_debugging
https://code.visualstudio.com/docs/editor/debugging#_global-launch-configuration

Leaving this open as a feature request for tasks

Yup +1 - This would be quite handy. At the moment the workaround is quite difficult. See: https://stackoverflow.com/questions/54278273/how-to-define-reference-multiple-tasks-json-files-in-one-vscode-workspace/54280048#54280048

+1 for a global "tasks.json" outside the workspace one to expand the task list for all workspaces.

Need like sublime text 3 'build_systems'. tasks.json move to workspace config

I would _love_ to combine multiple tasks.json (e.g. npm, gem, jekyll) in one big file. So I would avoid copy & paste issues. Or I can link / download my tasks from platforms like github and just reuse them.

Idea A: Just use all files with name *-tasks.json (or similar) as tasks.json from .vscode folder.

Idea B: Make the additional tasks.json files available as a embedded file.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "My NPM Tasks (with subfolder)",
            "fromFile": "./myTasks/npm/tasks.json"
        },
        {
            "label": "My Jekyll Tasks",
            "fromFile": "./myTasks/Jekylltasks.json"
        }
  ]
}

Global tasks.json is supported now in Insiders! You can create a tasks.json next to your global settings.json and put shell and process type tasks in it.
Note: you have to manually create the tasks.json next to your you user settings.json. I haven't added a command to create it for you yet.
https://github.com/microsoft/vscode/issues/1435

any update regarding this? @N7K4 idea is what I was looking as well.

I would _love_ to combine multiple tasks.json (e.g. npm, gem, jekyll) in one big file. So I would avoid copy & paste issues. Or I can link / download my tasks from platforms like github and just reuse them.

Idea A: Just use all files with name *-tasks.json (or similar) as tasks.json from .vscode folder.

Idea B: Make the additional tasks.json files available as a embedded file.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "My NPM Tasks (with subfolder)",
            "fromFile": "./myTasks/npm/tasks.json"
        },
        {
            "label": "My Jekyll Tasks",
            "fromFile": "./myTasks/Jekylltasks.json"
        }
  ]
}

@N7K4 idea is also what I was looking for.

I would _love_ to combine multiple tasks.json (e.g. npm, gem, jekyll) in one big file. So I would avoid copy & paste issues. Or I can link / download my tasks from platforms like github and just reuse them.

Idea A: Just use all files with name *-tasks.json (or similar) as tasks.json from .vscode folder.

Idea B: Make the additional tasks.json files available as a embedded file.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "My NPM Tasks (with subfolder)",
            "fromFile": "./myTasks/npm/tasks.json"
        },
        {
            "label": "My Jekyll Tasks",
            "fromFile": "./myTasks/Jekylltasks.json"
        }
  ]
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisdias picture chrisdias  路  3Comments

curtw picture curtw  路  3Comments

trstringer picture trstringer  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

mrkiley picture mrkiley  路  3Comments