From f495ab3dcba8f5b83ce844faa5758e8ec39363b8 Mon Sep 17 00:00:00 2001 From: Antoine du HAMEL Date: Sun, 3 May 2020 12:34:03 +0200 Subject: [PATCH] tools: add docserve target Spaws a webserver serving the docs. Helpful to circumvent the OS permission limitations or to access the docs form a different device on the local network. PR-URL: https://github.com/nodejs/node/pull/33221 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 97fb158898f4de..6f352c48c6f0c5 100644 --- a/Makefile +++ b/Makefile @@ -768,6 +768,11 @@ out/doc/api/all.json: $(apidocs_json) tools/doc/alljson.js docopen: $(apidocs_html) @$(PYTHON) -mwebbrowser file://$(PWD)/out/doc/api/all.html +.PHONY: docserve +docserve: $(apidocs_html) + @$(PYTHON) -mwebbrowser http://localhost:8000/all.html + @$(PYTHON) -m http.server -d $(PWD)/out/doc/api + .PHONY: docclean docclean: $(RM) -r out/doc