-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild.fs
49 lines (35 loc) · 970 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
44
45
46
47
48
49
open Fake.Core
open Fake.IO
open Helpers
initializeContext()
let appPath = Path.getFullName "docs"
let publishPath = Path.getFullName "publish/app"
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 npm run build" appPath
)
Target.create "Run" (fun _ ->
run dotnet "fable watch -o output -s --run npm run start" appPath
)
Target.create "Format" (fun _ ->
run dotnet "fantomas . -r" "docs"
)
Target.create "Pack" (fun _ ->
run dotnet "pack -c Release" "src/Fable.Auth0.React"
)
open Fake.Core.TargetOperators
let dependencies = [
"Clean"
==> "InstallClient"
==> "Bundle"
"Clean"
==> "InstallClient"
==> "Run"
"Pack"
]
[<EntryPoint>]
let main args = runOrDefault args