public static string NpmVersion(this ICakeContext context) { if (context == null) { throw new ArgumentNullException(nameof(context)); } AddinInformation.LogVersionInformation(context.Log); var settings = new NpmVersionSettings(); return(new NpmVersionTool(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools, context.Log).Version(settings)); }
public static string NpmVersion(this ICakeContext context, Action <NpmVersionSettings> configurator) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (configurator == null) { throw new ArgumentNullException(nameof(configurator)); } var settings = new NpmVersionSettings(); configurator(settings); return(context.NpmVersion(settings)); }