-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.fs
43 lines (31 loc) · 867 Bytes
/
Build.fs
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
open Fake.Core
open Fake.IO
open Helpers
initializeContext()
let appPath = Path.getFullName "src/App"
let publishPath = Path.getFullName "publish"
Target.create "Clean" (fun _ ->
Shell.cleanDir publishPath
run dotnet "fable clean --yes" appPath // Delete *.fs.js files created by Fable
)
Target.create "InstallClient" (fun _ -> run npm "install" ".")
Target.create "Bundle" (fun _ ->
run dotnet "fable -o output -s --run webpack -p" appPath
)
Target.create "Run" (fun _ ->
run dotnet "fable watch -o output -s --run webpack-dev-server" appPath
)
Target.create "Format" (fun _ ->
run dotnet "fantomas . -r" "src"
)
open Fake.Core.TargetOperators
let dependencies = [
"Clean"
==> "InstallClient"
==> "Bundle"
"Clean"
==> "InstallClient"
==> "Run"
]
[<EntryPoint>]
let main args = runOrDefault args