public static string NpmVersion(this ICakeContext context, NpmVersionSettings settings) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (settings == null) { throw new ArgumentNullException(nameof(settings)); } AddinInformation.LogVersionInformation(context.Log); var tool = new NpmVersionTool(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools, context.Log); return(tool.Version(settings)); }
protected override void RunTool() { var tool = new NpmVersionTool(FileSystem, Environment, ProcessRunner, Tools, Log); Version = tool.Version(Settings); }