forked from cake-contrib/Cake.Npm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NpmPublisher.cs
46 lines (43 loc) · 1.4 KB
/
NpmPublisher.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
namespace Cake.Npm.Publish
{
using System;
using Core;
using Core.Diagnostics;
using Core.IO;
using Core.Tooling;
/// <summary>
/// Tool for publishing npm modules.
/// </summary>
public class NpmPublisher : NpmTool<NpmPublishSettings>
{
/// <summary>
/// Initializes a new instance of the <see cref="NpmPublisher"/> class.
/// </summary>
/// <param name="fileSystem">The file system.</param>
/// <param name="environment">The environment.</param>
/// <param name="processRunner">The process runner.</param>
/// <param name="tools">The tool locator.</param>
/// <param name="log">Cake log instance.</param>
public NpmPublisher(
IFileSystem fileSystem,
ICakeEnvironment environment,
IProcessRunner processRunner,
IToolLocator tools,
ICakeLog log)
: base(fileSystem, environment, processRunner, tools, log)
{
}
/// <summary>
/// Publishes a npm package based on the specified settings.
/// </summary>
/// <param name="settings">The settings.</param>
public void Publish(NpmPublishSettings settings)
{
if (settings == null)
{
throw new ArgumentNullException(nameof(settings));
}
RunCore(settings);
}
}
}