geeklearningio / gl-vsts-tasks-yarn

Yarn Package Manager Visual Studio Team Services Build and Release Management extensions
MIT License
52 stars 18 forks source link

capability to do repo traversal and invoke yarn in dirs where yarn.lock file is detected #15

Open punjabirocker opened 7 years ago

punjabirocker commented 7 years ago

I have scenario where repository contains multiple node projects with each project having its own yarn.lock. I want to be able to have this task to traverse the repo and execute yarn install when it finds yarn.lock file similar to nuget restore task where you can provide a wild card and the task does the the job of traversing and restoring nuget packages. I believe this is a common scenario and would be plus if you add the capability

sandorfr commented 7 years ago

I love this suggestion, this will definitely bring an additional value to the Task. I've been thinking about the best approach.

I think I'll introduce a multimatch option to select the appropriate files, and then run yarn install on the containing directories of the selected files. It would give the opportunity to write exclusion rules if one don't need everything to be installed.

image