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 {