Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }