diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 0f4f033a..f9807999 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -43,26 +43,23 @@ true - $(NoWarn);NU1603;NU1604;NU1605;NU1608 + $(NoWarn);NU1603 - /usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }' - /usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }' + /usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }' + /usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }' - + - + - - - $([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)')) @@ -72,22 +69,11 @@ true - - true - - - - - - - - - $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached @@ -96,9 +82,7 @@ $(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references $(MSBuildProjectDirectory)\paket.references - - false - true + $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).$(TargetFramework).paket.resolved true references-file-or-cache-not-found @@ -117,29 +101,24 @@ - + true - target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths) + target-framework '$(TargetFramework)' - - + - - false - true - - + - + - + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) @@ -147,9 +126,7 @@ %(PaketReferencesFileLinesInfo.PackageVersion) - All - runtime - true + All @@ -206,8 +183,8 @@ - - + + runDotNet "restore" clientPath ) -Target.create "RestoreServer" (fun _ -> - runDotNet "restore" serverPath -) - Target.create "Build" (fun _ -> runDotNet "build" serverPath runDotNet "fable webpack-cli -- --config src/Client/webpack.config.js -p" clientPath ) - -Target.create "Run" (fun _ -> - let server = async { - runDotNet "watch run" serverPath - } - let client = async { - runDotNet "fable webpack-dev-server -- --config src/Client/webpack.config.js" clientPath - } - let browser = async { - do! Async.Sleep 5000 - openBrowser "http://localhost:8080" - } - - [ server; client; browser ] +Target.create "Run" (fun p -> + let vsCodeSession = Environment.hasEnvironVar "vsCodeSession" + let safeClientOnly = Environment.hasEnvironVar "safeClientOnly" + + let tasks = + [ if not safeClientOnly then yield async { runDotNet "watch run" serverPath } + yield async { runDotNet "fable webpack-dev-server -- --config src/Client/webpack.config.js" clientPath } + if not vsCodeSession then + yield async { + do! Async.Sleep 5000 + openBrowser "http://localhost:8080" } ] + + tasks |> Async.Parallel |> Async.RunSynchronously |> ignore @@ -224,7 +219,6 @@ open Fake.Core.TargetOperators "Clean" ==> "InstallClient" - ==> "RestoreServer" ==> "Run" Target.runOrDefaultWithArguments "Build"