Open Welding-Torch opened 4 months ago
@pd93
I'm also looking for a way to do this. My project has lots of subfolders with different build processes, each driven by their own Taskfile.yml
. Since there isn't one in the root directory for the project, I am stuck with the extension saying: "No Taskfile found in this workspace. Click the button below to get started and initialize a new Taskfile. (Initialize Taskfile)"
same here. Would be great to have a way to scan for taskfiles in a folder hirerarchy
I searched for this issue too, and solved it manually by adding a root Taskfile.yml (using the Initialize Taskfile button in VSCode) and then including the various Taskfiles wherever they existed. Tasks from the various subfolder tasks are listed and linked in the panel.
Could be worth adding a commented-out "includes example" in the initialize example, or link to documentation.
version: '3'
includes:
anamespaceforthisfolder:
taskfile: ./my.Project/Base/Taskfile.yml
frontend:
taskfile: ./my.Project/Frontend/Taskfile.yml
backend:
taskfile: ./my.Project/Backend/Taskfile.yml
That works really well for me, @jamcow -- thank you! Agreed that it would be good to put an example in the docs, if this seems to be a common pattern.
For my situation, it was helpful to also add a dir
specification for eachincludes
clause, like this:
includes:
anamespaceforthisfolder:
taskfile: ./my.Project/Base/Taskfile.yml
dir: ./my.Project/Base
@jamcow thanks for sharing this method! I second adding this to the docs, it could help other ppl who want this without having to dig through GitHub Issues.
Still this is just a fix, and it would be really great if Task didn't need it at all. @pd93 it would be great if the Task extension could detect multiple task files nested within folders.
So I tend to have my taskfile placed inside a sub-folder in my project, next to where my code is. It would be really convenient if the Taskfile extension could detect that
Taskfile.yml
and show it to me in the sidebar.Thanks devs.