Reputation: 623
I have a functions/ directory, which I usually open a whole new vscode window for. It has defined it's own tasks.json file.
But I want to be able to run the tasks stored in the functions/.vscode/tasks.json file from the root directory vscode window as well as the window that's been opened with functions/ as the root dir.
I guess I could merge the two files, and then just open the same root dir as a workspace in two separate vscode windows, and just navigate to my functions subdirectory in one of the windows. That way the tasks.json will be shared between both vscode windows.
But this doesn't seem like the best solution. Is there a way to get Vscode to read more than one tasks.json file? Is it possible to reference the second one (found in functions/.vscode/tasks.json) in the vscode settings somewhere?
Upvotes: 2
Views: 4895
Reputation: 25651
I found this: https://github.com/cmccandless/vstask
from here: https://stackoverflow.com/a/65545345/887836
this would allow you to install vstask and have a global task file that has custom tasks that execute other tasks. I didn't try it (yet).
But I will update if that works. sadly it's written in python and not in typescript (i.e.: reusing vscode library / code itself).
Upvotes: 0
Reputation: 182661
Multiple tasks.json files don't appear to be possible or in any pipeline for inclusion. See Add multiple task.json configuration files.
Upvotes: 5