-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.fsx
63 lines (50 loc) · 1.04 KB
/
build.fsx
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#r "paket: groupref FakeBuild //"
#load ".fake/build.fsx/intellisense.fsx"
open System
open Fake.Core
open Fake.Core.TargetOperators
open Fake.DotNet
open Fake.IO
open Fake.IO.Globbing.Operators
open Fake.IO.FileSystemOperators
open Fake.JavaScript
Target.create "Clean" (fun _ ->
!! "src/**/bin"
++ "src/**/obj"
++ "dist"
++ "fable"
|> Shell.cleanDirs
)
Target.create "DotnetRestore" (fun _ ->
DotNet.restore
(DotNet.Options.withWorkingDirectory __SOURCE_DIRECTORY__)
"fable-elmish-electron-demo.sln"
)
Target.create "YarnInstall" (fun _ ->
Yarn.install id
)
Target.create "Build" (fun _ ->
Yarn.exec "compile" id
)
Target.create "Dev" (fun _ ->
Yarn.exec "dev" id
)
Target.create "Dist" (fun _ ->
Yarn.exec "dist" id
)
Target.create "DistDir" (fun _ ->
Yarn.exec "dist:dir" id
)
// Build order
"Clean"
==> "DotnetRestore"
==> "YarnInstall"
==> "Build"
"YarnInstall"
==> "Dev"
"YarnInstall"
==> "Dist"
"YarnInstall"
==> "DistDir"
// start build
Target.runOrDefault "Dev"