#addin "Cake.Yarn"
Task("Yarn")
.Does(() =>
{
// yarn install
Yarn.Install();
// yarn global add gulp
Yarn.Add(settings => settings.Package("gulp").Globally());
// yarn add gulp
Yarn.Add(settings => settings.Package("gulp"));
});
Task("Yarn-FromPath")
.Does(() =>
{
// Yarn.FromPath(DirectoryPath).
// yarn global add gulp (from path ./wwwroot)
Yarn.FromPath("./wwwroot").Add(settings => settings.Package("gulp").Globally());
// yarn add gulp (from parent path)
Yarn.FromPath("../").Add(settings => settings.Package("gulp"));
});
Task("Yarn-RunScript")
.Does(() =>
{
Yarn.RunScript("test");
});
Task("Yarn-Pack")
.Does(() =>
{
Yarn.Pack();
});
Cake.Yarn currently supports the following yarn commands:
yarn install
yarn add
yarn run
yarn pack
My primary goal for the project is to support the build workflow I need as a .NET developer, additional features have been contributed
Thanks to the cakebuild.net site, documentation can be found here
Cake.Yarn is covered by a set of unit tests
If you have feature requests please submit them as issues, or better yet as pull requests :)