-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBuild.fs
More file actions
32 lines (23 loc) · 819 Bytes
/
Copy pathBuild.fs
File metadata and controls
32 lines (23 loc) · 819 Bytes
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
open Fake
open Fake.Core
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.Core.TargetOperators
open BuildHelpers
open BuildTools
initializeContext ()
let srcPath = Path.getFullName "src"
let clientSrcPath = srcPath </> "ElmishStore.Example"
let clean proj =
[ proj </> "bin"; proj </> "obj"; proj </> ".fable-build" ] |> Shell.cleanDirs
Target.create "Clean" (fun _ -> clean clientSrcPath)
Target.create "InstallClient" (fun _ ->
printfn "Node version:"
run Tools.node "--version" clientSrcPath
printfn "Yarn version:"
run Tools.yarn "--version" clientSrcPath
run Tools.yarn "install --frozen-lockfile" clientSrcPath)
Target.create "Run" (fun _ -> run Tools.yarn "start" "")
let dependencies = [ "InstallClient" ==> "Clean" ==> "Run" ]
[<EntryPoint>]
let main args = runOrDefault "Run" args