Skip to content

[Repo Assist] Split BuildCommand.fs into DocContent.fs, Serve.fs, and BuildCommand.fs#1036

Closed
github-actions[bot] wants to merge 4 commits intomainfrom
repo-assist/fix-issue-1022-split-buildcommand-7a7c06d9bd38078d
Closed

[Repo Assist] Split BuildCommand.fs into DocContent.fs, Serve.fs, and BuildCommand.fs#1036
github-actions[bot] wants to merge 4 commits intomainfrom
repo-assist/fix-issue-1022-split-buildcommand-7a7c06d9bd38078d

Conversation

@github-actions
Copy link
Contributor

🤖 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.fs contained 2100+ lines across three unrelated concerns. This PR splits it into three focused files:

File Lines Contents
DocContent.fs ~800 DocContent type — markdown/script/notebook → static site processing
Serve.fs ~510 Serve module — Suave dev server with hot reload websocket support
BuildCommand.fs ~860 CoreBuildOptions, BuildCommand, WatchCommand — CLI command definitions

Approach

The split follows the natural dependency order:

  1. DocContent.fs — converts raw content to HTML/Markdown; no dependency on the server
  2. Serve.fs — dev server; no dependency on build options
  3. BuildCommand.fs — build orchestration; uses both DocContent and Serve

Each file gets only the open statements 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

Generated by Repo Assist

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@afb00b92a9514fee9a14c583f059a03d05738f70

Generated by Repo Assist for issue #1022

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@afb00b92a9514fee9a14c583f059a03d05738f70

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>
@dsyme dsyme marked this pull request as ready for review February 26, 2026 18:52
@dsyme dsyme closed this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split large files across the repository

1 participant