Пример #1
0
        public static string NpmVersion(this ICakeContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            AddinInformation.LogVersionInformation(context.Log);
            return(context.NpmVersion(new NpmVersionSettings()));
        }
Пример #2
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));
        }
Пример #3
0
        public static void NpmSet(this ICakeContext context, NpmSetSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            AddinInformation.LogVersionInformation(context.Log);
            var tool = new NpmSetTool(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools, context.Log);

            tool.Set(settings);
        }
Пример #4
0
        public static IEnumerable <FilePath> NpmPack(this ICakeContext context, NpmPackSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            AddinInformation.LogVersionInformation(context.Log);

            var packer = new NpmPacker(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools, context.Log);

            return(packer.Pack(settings));
        }