nuke
                                
                                 nuke copied to clipboard
                                
                                    nuke copied to clipboard
                            
                            
                            
                        Add yarn tool with support for basic commands
We've (in our company) been using Nuke Tool for Yarn in our build stack for quite some time, since I just saw the open request (#1145) I thought why not open a PR.
public interface IYarn : INukeBuild
{
    AbsolutePath SourceDirectory => RootDirectory / "app";
    Target Lint => _ => _
        .Executes(() =>
        {
            YarnTasks.YarnRun(o => o
                .SetCommand("lint")
                .SetArguments("--no-fix")
                .SetProcessWorkingDirectory(sourceDirectory));
        });
 
    Target Install => _ => _
        .Executes(() =>
        {
            YarnTasks.YarnInstall(o => o.SetProcessWorkingDirectory(SourceDirectory));
        });
    Target Build => _ => _
        .DependsOn(Install)
        .Executes(() =>
        {
            YarnTasks.YarnRun(o => o
                .SetCommand("build")
                .SetArguments("--production")
                .SetProcessWorkingDirectory(SourceDirectory));
        });
}
I confirm that the pull-request:
- [x] Follows the contribution guidelines
- [x] Is based on my own work
- [x] Is in compliance with my employer
Need one of these for pnpm as well. :) Guessing I can just clone this pr for pnpm...
@stijnwop Do you mind adding the --silent parameter? :)
Like yarn --silent install or yarn --silent run xxx
@stijnwop Did you gave up on this? This would be a great addition.
@IT-VBFK No, but it depends on when this will be approved and used by the code owner..