Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,19 @@ out/doc/apilinks.json: $(wildcard lib/*.js) tools/doc/node_modules | out/doc
) \
fi

doc/node.1: doc/api/cli.md tools/doc/node_modules
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need that check?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, doesn't npm need it?

echo "Skipping $@ (no crypto and/or no ICU)"; \
else \
$(call available-node, \
$(DOC_KIT) generate \
-t man-page \
-i $< \
-o $(@D) \
-v $(VERSION) \
) \
fi

.PHONY: docopen
docopen: doc-only ## Open the documentation in a web browser.
@$(PYTHON) -mwebbrowser file://$(abspath $<)
Expand Down Expand Up @@ -1480,8 +1493,29 @@ tools/.mdlintstamp: tools/lint-md/node_modules/remark-parse/package.json $(LINT_
@$(call available-node,$(run-lint-md))
@touch $@

tools/.manpagelintstamp: doc/api/cli.md tools/doc/node_modules
$(info Verifying that doc/node.1 is up to date...)
@if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \
echo "Skipping doc/node.1 verification (no crypto and/or no ICU)"; \
else \
$(RM) -r out/doc/.manpagecheck && \
mkdir -p out/doc/.manpagecheck && \
$(call available-node, \
$(DOC_KIT) generate \
-t man-page \
-i doc/api/cli.md \
-o out/doc/.manpagecheck \
-v $(VERSION) \
) \
if ! diff -u doc/node.1 out/doc/.manpagecheck/node.1; then \
echo 'doc/node.1 is out of date; run `make doc/node.1` to regenerate it.'; \
exit 1; \
fi; \
fi
@touch $@

.PHONY: lint-md
lint-md: lint-js-doc | tools/.mdlintstamp ## Lint the markdown documents maintained by us in the codebase.
lint-md: lint-js-doc | tools/.mdlintstamp tools/.manpagelintstamp ## Lint the markdown documents maintained by us in the codebase.

run-format-md = tools/lint-md/lint-md.mjs --format $(LINT_MD_FILES)
.PHONY: format-md
Expand Down
6 changes: 6 additions & 0 deletions doc/node.1
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,10 @@ Enable experimental \fBimport.meta.resolve()\fR parent URL support, which allows
passing a second \fBparentURL\fR argument for contextual resolution.
Previously gated the entire \fBimport.meta.resolve\fR feature.
.
.It Fl -experimental-import-text
Enable experimental support for importing modules with
\fBwith { type: 'text' }\fR.
.
.It Fl -experimental-inspector-network-resource
Enable experimental support for inspector network resources.
.
Expand Down Expand Up @@ -1958,6 +1962,8 @@ one is included in the list below.
.It
\fB--experimental-import-meta-resolve\fR
.It
\fB--experimental-import-text\fR
.It
\fB--experimental-json-modules\fR
.It
\fB--experimental-loader\fR
Expand Down
Loading