Skip to content

Commit 8f9ebf1

Browse files
committed
chore: updated doc-kit and make command
1 parent 2085157 commit 8f9ebf1

File tree

3 files changed

+487
-649
lines changed

3 files changed

+487
-649
lines changed

Makefile

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -815,11 +815,9 @@ VERSION=v$(RAWVER)
815815

816816
.PHONY: doc-only
817817
doc-only: tools/doc/node_modules \
818-
$(apidoc_dirs) ## Builds the docs with the local or the global Node.js binary.
818+
$(apidoc_dirs) $(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json out/doc/apilinks.json ## Builds the docs with the local or the global Node.js binary.
819819
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
820820
echo "Skipping doc-only (no crypto or no icu)"; \
821-
else \
822-
$(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/apilinks.json; \
823821
fi
824822

825823
.PHONY: doc
@@ -835,45 +833,21 @@ out/doc/api: doc/api
835833
mkdir -p $@
836834
cp -r doc/api out/doc
837835

838-
# For generating individual doc files instead of all at once
839-
out/doc/api/%.html out/doc/api/%.json: doc/api/%.md tools/doc/node_modules | out/doc/api
840-
$(call available-node, \
841-
$(DOC_KIT) generate \
842-
-t $(subst .,legacy-, $(suffix $@)) \
843-
-i $< \
844-
--ignore $(skip_apidoc_files) \
845-
-o $(@D) \
846-
-c ./CHANGELOG.md \
847-
-v $(VERSION) \
848-
--index doc/api/index.md \
849-
--type-map doc/type-map.json \
850-
) \
851-
852-
out/doc/api/all.html: $(apidocs_html) | out/doc/api
836+
# Generate all doc files (individual and all.html/all.json) in a single doc-kit call
837+
# Using grouped targets (&:) so Make knows one command produces all outputs
838+
$(apidocs_html) $(apidocs_json) out/doc/api/all.html out/doc/api/all.json &: $(apidoc_sources) tools/doc/node_modules | out/doc/api
853839
$(call available-node, \
854840
$(DOC_KIT) generate \
855841
-t legacy-html-all \
856-
-i doc/api/*.md \
857-
--ignore $(skip_apidoc_files) \
858-
-o $(@D) \
859-
-c ./CHANGELOG.md \
860-
-v $(VERSION) \
861-
--index doc/api/index.md \
862-
--type-map doc/type-map.json \
863-
) \
864-
865-
out/doc/api/all.json: $(apidocs_json) | out/doc/api
866-
$(call available-node, \
867-
$(DOC_KIT) generate \
868842
-t legacy-json-all \
869843
-i doc/api/*.md \
870844
--ignore $(skip_apidoc_files) \
871-
-o $(@D) \
845+
-o out/doc/api \
872846
-c ./CHANGELOG.md \
873847
-v $(VERSION) \
874848
--index doc/api/index.md \
875849
--type-map doc/type-map.json \
876-
) \
850+
)
877851

878852
out/doc/apilinks.json: $(wildcard lib/*.js) | out/doc
879853
$(call available-node, \

0 commit comments

Comments
 (0)