forked from cake-contrib/Cake.Npm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NpmPublishSettings.cs
40 lines (36 loc) · 1.2 KB
/
NpmPublishSettings.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
namespace Cake.Npm.Publish
{
using Core;
using Core.IO;
/// <summary>
/// Contains settings used by <see cref="NpmPublisher"/>.
/// </summary>
public class NpmPublishSettings : NpmSettings
{
/// <summary>
/// Initializes a new instance of the <see cref="NpmPublishSettings"/> class.
/// </summary>
public NpmPublishSettings()
: base("publish")
{
}
/// <summary>
/// Source to publish.
/// A folder containing a package.json file or an url or file path to a gzipped tar archive
/// containing a single folder with a package.json file inside.
/// </summary>
public string Source { get; set; }
/// <summary>
/// Evaluates the settings and writes them to <paramref name="args"/>.
/// </summary>
/// <param name="args">The argument builder into which the settings should be written.</param>
protected override void EvaluateCore(ProcessArgumentBuilder args)
{
base.EvaluateCore(args);
if (!string.IsNullOrWhiteSpace(Source))
{
args.AppendQuoted(Source);
}
}
}
}