Skip to content

Commit 8eef50c

Browse files
committed
build: allow linting node.1
1 parent 54296cb commit 8eef50c

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

Makefile

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,19 @@ out/doc/apilinks.json: $(wildcard lib/*.js) tools/doc/node_modules | out/doc
932932
) \
933933
fi
934934

935+
doc/node.1: doc/api/cli.md tools/doc/node_modules
936+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
937+
echo "Skipping $@ (no crypto and/or no ICU)"; \
938+
else \
939+
$(call available-node, \
940+
$(DOC_KIT) generate \
941+
-t man-page \
942+
-i $< \
943+
-o $(@D) \
944+
-v $(VERSION) \
945+
) \
946+
fi
947+
935948
.PHONY: docopen
936949
docopen: doc-only ## Open the documentation in a web browser.
937950
@$(PYTHON) -mwebbrowser file://$(abspath $<)
@@ -1480,8 +1493,29 @@ tools/.mdlintstamp: tools/lint-md/node_modules/remark-parse/package.json $(LINT_
14801493
@$(call available-node,$(run-lint-md))
14811494
@touch $@
14821495

1496+
tools/.manpagelintstamp: doc/api/cli.md tools/doc/node_modules
1497+
$(info Verifying that doc/node.1 is up to date...)
1498+
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
1499+
echo "Skipping doc/node.1 verification (no crypto and/or no ICU)"; \
1500+
else \
1501+
$(RM) -r out/doc/.manpagecheck && \
1502+
mkdir -p out/doc/.manpagecheck && \
1503+
$(call available-node, \
1504+
$(DOC_KIT) generate \
1505+
-t man-page \
1506+
-i doc/api/cli.md \
1507+
-o out/doc/.manpagecheck \
1508+
-v $(VERSION) \
1509+
) \
1510+
if ! diff -u doc/node.1 out/doc/.manpagecheck/node.1; then \
1511+
echo 'doc/node.1 is out of date; run `make doc/node.1` to regenerate it.'; \
1512+
exit 1; \
1513+
fi; \
1514+
fi
1515+
@touch $@
1516+
14831517
.PHONY: lint-md
1484-
lint-md: lint-js-doc | tools/.mdlintstamp ## Lint the markdown documents maintained by us in the codebase.
1518+
lint-md: lint-js-doc | tools/.mdlintstamp tools/.manpagelintstamp ## Lint the markdown documents maintained by us in the codebase.
14851519

14861520
run-format-md = tools/lint-md/lint-md.mjs --format $(LINT_MD_FILES)
14871521
.PHONY: format-md

doc/node.1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,10 @@ Enable experimental \fBimport.meta.resolve()\fR parent URL support, which allows
745745
passing a second \fBparentURL\fR argument for contextual resolution.
746746
Previously gated the entire \fBimport.meta.resolve\fR feature.
747747
.
748+
.It Fl -experimental-import-text
749+
Enable experimental support for importing modules with
750+
\fBwith { type: 'text' }\fR.
751+
.
748752
.It Fl -experimental-inspector-network-resource
749753
Enable experimental support for inspector network resources.
750754
.
@@ -1958,6 +1962,8 @@ one is included in the list below.
19581962
.It
19591963
\fB--experimental-import-meta-resolve\fR
19601964
.It
1965+
\fB--experimental-import-text\fR
1966+
.It
19611967
\fB--experimental-json-modules\fR
19621968
.It
19631969
\fB--experimental-loader\fR

0 commit comments

Comments
 (0)