Reputation: 800
I need to share some TypeScript classes between two VSTS build tasks. As I understand, all compiled files required to be in the task folder to be able to function the build task.
Current scenario: I have common files in common folder in the root folder of the VSTS code base. I have two task A and B which utilize these classes. When I package the code it ignores the common folder.
Is it possible to achieve this in above scenario? Please advice.
Thanks.
Upvotes: 1
Views: 331
Reputation: 29958
Your understand is correct. The build tasks are stored in separate folders after upload them to VSTS/TFS. So you must place all the required files in the build task folder when you packing it. If you want to share the classes, you can consider to use npm package.
Upvotes: 1
Reputation: 51073
This can't be achieved. Each build task are independent of each other. You may have to add the classes for both task respectively.
Here is the sample of VSTS task in GitHub for you reference: vsts-tasks/Tasks/
Upvotes: 2