Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions Build.fs
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,23 @@ open Fake.Core.TargetOperators

let dependencies =
[
"Clean" ==> "RestoreClient" ==> "Bundle"
"Clean" ==> "RestoreClient" ==> "Build" ==> "Run"
// Two independent prongs: a self-sufficient server build (Build restores
// and builds GenPRES.sln itself, no npm involved) and a client toolchain
// (Clean clears stale Fable/.jsx output, then RestoreClient runs npm ci).
// Each leaf target below declares only the prong(s) its body actually uses,
// rather than chaining everything through one sequence.
"Clean" ==> "RestoreClient"

"RestoreClient" ==> "Build" ==> "TestHeadless"
"RestoreClient" ==> "Build" ==> "WatchTests"
"RestoreClient" ==> "Bundle"

"Build" ==> "Run"
"RestoreClient" ==> "Run"

"Build" ==> "TestHeadless"
"RestoreClient" ==> "TestHeadless"

"Build" ==> "WatchTests"
"RestoreClient" ==> "WatchTests"
Comment thread
7sharp9 marked this conversation as resolved.

"Build" ==> "ServerTests"
"Build" ==> "CheckVersions"
Expand Down
23 changes: 18 additions & 5 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ dotnet run [target]
└─► executes each target step
```

For example, `dotnet run` (no target) runs the `Run` target, which depends on:
`Clean → RestoreClient → Build → Run` (server + Fable watcher in parallel).
For example, `dotnet run` (no target) runs the `Run` target, which depends on
two independent prerequisites: `Build` (compiles the server, no npm involved)
and `Clean → RestoreClient` (clears stale Fable output, then restores npm
packages for the Fable/Vite dev server).

### FAKE Build Targets Reference

Expand All @@ -72,12 +74,23 @@ For example, `dotnet run` (no target) runs the `Run` target, which depends on:

```text
Clean ──► RestoreClient ──► Bundle
Clean ──► RestoreClient ──► Build ──► Run

RestoreClient ──► Build ──► TestHeadless
RestoreClient ──► Build ──► WatchTests
Build ──► Run
RestoreClient ──► Run

Build ──► TestHeadless
RestoreClient ──► TestHeadless

Build ──► WatchTests
RestoreClient ──► WatchTests

Build ──► ServerTests
Build ──► CheckVersions
```

`Build` and `RestoreClient` are independent prongs — a target that only needs
one of them (e.g. `ServerTests`, `CheckVersions`) doesn't pay for the other.

### What Happens During `dotnet run` (the `Run` target)

The `Run` target starts two long-running processes **in parallel**:
Expand Down