A set of aliases for Cake to help with running Yarn (node package manager from Facebook) commands
C# PowerShell Shell
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src Updated to cake core 0.28.1 Jul 3, 2018
tools
.gitignore
GitVersion.yml
LICENSE
README.md
appveyor.yml
build.cake
build.ps1 refactoring: Migrate to netstandard and update to cake 0.28.0 Jun 20, 2018
build.sh
cake.config
usage.cake Adds support for `yarn version` Sep 5, 2017

README.md

cake-yarn

NuGet Build status

Usage

    #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 install from path
            Yarn.FromPath("./wwwroot").Install();
            
            // 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();
        });

    Task("Yarn-Version")
        .Does(() =>
        {
            // yarn version
            Yarn.Version();

            // yarn version --new-version 0.1.0
            Yarn.Version(settings => settings.SetVersion("0.1.0"));
        });

Scope

Cake.Yarn currently supports the following yarn commands:

  • yarn install
  • yarn add
  • yarn run
  • yarn pack
  • yarn version
  • yarn cache
  • yarn remove

My primary goal for the project is to support the build workflow I need as a .NET developer, additional features have been contributed

Documentation

Thanks to the cakebuild.net site, documentation can be found here

Tests

Cake.Yarn is covered by a set of unit tests

I can't do insert-command-here

If you have feature requests please submit them as issues, or better yet as pull requests :)