[Repo Assist] Split BuildCommand.fs into DocContent.fs, Serve.fs, and BuildCommand.fs#1036
Closed
github-actions[bot] wants to merge 4 commits intomainfrom
Closed
Conversation
BuildCommand.fs was 2100+ lines containing three unrelated concerns: - DocContent type: doc content processing (markdown, scripts, notebooks) - Serve module: Suave-based dev server with hot reload - CoreBuildOptions/BuildCommand/WatchCommand: build command definitions Split into three focused files following natural dependencies: 1. DocContent.fs (~800 lines) - DocContent type 2. Serve.fs (~510 lines) - Serve module (dev web server) 3. BuildCommand.fs (~860 lines) - CoreBuildOptions, BuildCommand, WatchCommand Addresses #1022 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Addresses #1022 (continuing the large-file split work — follows on from merged #1032).
Summary
BuildCommand.fscontained 2100+ lines across three unrelated concerns. This PR splits it into three focused files:DocContent.fsDocContenttype — markdown/script/notebook → static site processingServe.fsServemodule — Suave dev server with hot reload websocket supportBuildCommand.fsCoreBuildOptions,BuildCommand,WatchCommand— CLI command definitionsApproach
The split follows the natural dependency order:
DocContent.fs— converts raw content to HTML/Markdown; no dependency on the serverServe.fs— dev server; no dependency on build optionsBuildCommand.fs— build orchestration; uses bothDocContentandServeEach file gets only the
openstatements it actually needs.Test Status
✅ Build succeeds:
dotnet build src/fsdocs-tool/fsdocs-tool.fsproj --configuration Release— 0 errors, 0 warnings (excluding pre-existing NU1904 advisory)✅ Code formatted with Fantomas