From aeebb4d34bc9e636fb82c5f8df16838452097ac8 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Thu, 22 Jan 2026 11:54:18 +0100 Subject: [PATCH] doc: add command to continuously rebuild documentation --- docs/service-implementation-guide.md | 7 +++++++ flake.nix | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/docs/service-implementation-guide.md b/docs/service-implementation-guide.md index 2eac1c8..9d170a5 100644 --- a/docs/service-implementation-guide.md +++ b/docs/service-implementation-guide.md @@ -461,6 +461,13 @@ nix flake check nix build .#manualHtml ``` +To continuously rebuild the documentation of file change, run the following command. +To exit, you'll need to do Ctrl-C twice in a row. + +```bash +nix run .#manualHtml-watch +``` + ### Iterative Development Approach {#iterative-development-approach} 1. **Start with basic functionality** - get core service working diff --git a/flake.nix b/flake.nix index 9691486..ec8cc6c 100644 --- a/flake.nix +++ b/flake.nix @@ -208,6 +208,16 @@ ''; }); + packages.manualHtml-watch = pkgs.writeShellApplication { + name = "manualHtml-watch"; + text = '' + while sleep 1; do + find . -name "*.nix" -o -name "*.md" \ + | entr -d sh -c '(nix run --offline .#update-redirects && nix build --offline .#manualHtml || :)' + done + ''; + }; + lib = (pkgs.callPackage ./lib { }) // { test = pkgs.callPackage ./test/common.nix { }; contracts = pkgs.callPackage ./modules/contracts {