forked from cake-contrib/Cake.Yarn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
usage.cake
34 lines (24 loc) · 870 Bytes
/
usage.cake
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
#r "artifacts/build/Cake.Yarn.dll"
var target = Argument("target", "Default");
Task("Default")
.Does(() =>
{
// yarn install
Yarn.Install();
// yarn global add gulp
Yarn.Add(settings => settings.Package("gulp").Globally());
// yarn add gulp
Yarn.Add(settings => settings.Package("gulp"));
// yarn run hello
Yarn.RunScript("hello");
// run yarn in another directory
Yarn.FromPath("./usage").Install().RunScript("hello");
// run yarn pack
Yarn.Pack();
// run yarn version
Yarn.Version(settings => settings.DisableGitTagCreation());
});
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);