Skip to content

Commit

Permalink
Using nuget packages
Browse files Browse the repository at this point in the history
  • Loading branch information
zaaack committed Mar 6, 2018
1 parent bc02289 commit 8832e8a
Show file tree
Hide file tree
Showing 19 changed files with 827 additions and 174 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"*.suo":true,
"*.suo":true,
"*.user":true,
"*.sln.docstates":true,
"*.userprefs":true,
Expand All @@ -25,4 +25,4 @@
"src/**/obj":true,
"src/Client/out":true
}
}
}
28 changes: 28 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ Target "RunClientTests" (fun _ ->

let ipAddress = "localhost"
let port = 8080
let serverPort = 8085

FinalTarget "KillProcess" (fun _ ->
killProcess "dotnet"
Expand Down Expand Up @@ -216,6 +217,30 @@ Target "Run" (fun _ ->
)


Target "RunSSR" (fun _ ->
runDotnet clientPath "restore"
runDotnet serverTestsPath "restore"

let unitTestsWatch = async {
let result =
ExecProcess (fun info ->
info.FileName <- dotnetExePath
info.WorkingDirectory <- serverTestsPath
info.Arguments <- sprintf "watch msbuild /t:TestAndRun /p:DotNetHost=%s /p:Configuration=DebugSSR" dotnetExePath) TimeSpan.MaxValue

if result <> 0 then failwith "Website shut down." }

let fablewatch = async { runDotnet clientPath "fable webpack-dev-server --port free" }
let openBrowser = async {
System.Threading.Thread.Sleep(10000)
Diagnostics.Process.Start("http://"+ ipAddress + sprintf ":%d" serverPort) |> ignore }

Async.Parallel [| unitTestsWatch; fablewatch; openBrowser |]
|> Async.RunSynchronously
|> ignore
)


// --------------------------------------------------------------------------------------
// Release Scripts

Expand Down Expand Up @@ -354,4 +379,7 @@ Target "All" DoNothing
"InstallClient"
==> "Run"

"InstallClient"
==> "RunSSR"

RunTargetOrDefault "All"
Loading

0 comments on commit 8832e8a

Please sign in to comment.