| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -932,6 +932,22 @@ out/doc/apilinks.json: $(wildcard lib/*.js) tools/doc/node_modules | out/doc | |||
| 932 | 932 | ) \ | |
| 933 | 933 | fi | |
| 934 | 934 | ||
| 935 | + doc/node.1: | ||
| 936 | + $(error Please use 'make node.1' instead of 'make $@'.) | ||
| 937 | + | ||
| 938 | + .PHONY: node.1 | ||
| 939 | + node.1: doc/api/cli.md tools/doc/node_modules | ||
| 940 | + @if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \ | ||
| 941 | + echo "Skipping $@ (no crypto and/or no ICU)"; \ | ||
| 942 | + else \ | ||
| 943 | + $(call available-node, \ | ||
| 944 | + $(DOC_KIT) generate \ | ||
| 945 | + -v $(VERSION) \ | ||
| 946 | + --config-file tools/doc/man-page.doc-kit.config.mjs \ | ||
| 947 | + -o doc \ | ||
| 948 | + ) \ | ||
| 949 | + fi | ||
| 950 | + | ||
| 935 | 951 | .PHONY: docopen | |
| 936 | 952 | docopen: doc-only ## Open the documentation in a web browser. | |
| 937 | 953 | @$(PYTHON) -mwebbrowser file://$(abspath $<) | |
@@ -1480,8 +1496,26 @@ tools/.mdlintstamp: tools/lint-md/node_modules/remark-parse/package.json $(LINT_ | |||
| 1480 | 1496 | @$(call available-node,$(run-lint-md)) | |
| 1481 | 1497 | @touch $@ | |
| 1482 | 1498 | ||
| 1499 | + tools/.manpagelintstamp: doc/node.1 doc/api/cli.md tools/doc/node_modules | ||
| 1500 | + $(info Verifying that $< is up to date...) | ||
| 1501 | + @if [ "$(shell $(node_use_openssl_and_icu))" != "true" ]; then \ | ||
| 1502 | + echo "Skipping $< verification (no crypto and/or no ICU)"; \ | ||
| 1503 | + else \ | ||
| 1504 | + $(RM) -r tools/doc/.manpagecheck && \ | ||
| 1505 | + $(call available-node, \ | ||
| 1506 | + $(DOC_KIT) generate \ | ||
| 1507 | + -v $(VERSION) \ | ||
| 1508 | + --config-file tools/doc/man-page.doc-kit.config.mjs \ | ||
| 1509 | + ) \ | ||
| 1510 | + if ! diff -u $< tools/doc/.manpagecheck/node.1; then \ | ||
| 1511 | + echo '$< is out of date; run `make node.1` to regenerate it.' >&2; \ | ||
| 1512 | + exit 1; \ | ||
| 1513 | + fi; \ | ||
| 1514 | + fi | ||
| 1515 | + @touch $@ | ||
| 1516 | + | ||
| 1483 | 1517 | .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. | ||
| 1485 | 1519 | ||
| 1486 | 1520 | run-format-md = tools/lint-md/lint-md.mjs --format $(LINT_MD_FILES) | |
| 1487 | 1521 | .PHONY: format-md | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -147,7 +147,7 @@ The valid arguments for the \fB--allow-fs-read\fR flag are: | |||
| 147 | 147 | \fB*\fR - To allow all \fBFileSystemRead\fR operations. | |
| 148 | 148 | .It | |
| 149 | 149 | Multiple paths can be allowed using multiple \fB--allow-fs-read\fR flags. | |
| 150 | - Example \fB--allow-fs-read=/folder1/ --allow-fs-read=/folder1/\fR | ||
| 150 | + Example \fB--allow-fs-read=/folder1/ --allow-fs-read=/folder2/\fR | ||
| 151 | 151 | .El | |
| 152 | 152 | Examples can be found in the File System Permissions documentation. | |
| 153 | 153 | The initializer module and custom \fB--require\fR modules has a implicit | |
@@ -175,7 +175,7 @@ The valid arguments for the \fB--allow-fs-write\fR flag are: | |||
| 175 | 175 | \fB*\fR - To allow all \fBFileSystemWrite\fR operations. | |
| 176 | 176 | .It | |
| 177 | 177 | Multiple paths can be allowed using multiple \fB--allow-fs-write\fR flags. | |
| 178 | - Example \fB--allow-fs-write=/folder1/ --allow-fs-write=/folder1/\fR | ||
| 178 | + Example \fB--allow-fs-write=/folder1/ --allow-fs-write=/folder2/\fR | ||
| 179 | 179 | .El | |
| 180 | 180 | Paths delimited by comma (\fB,\fR) are no longer allowed. | |
| 181 | 181 | When passing a single flag with a comma a warning will be displayed. | |
@@ -742,7 +742,8 @@ passing a second \fBparentURL\fR argument for contextual resolution. | |||
| 742 | 742 | Previously gated the entire \fBimport.meta.resolve\fR feature. | |
| 743 | 743 | . | |
| 744 | 744 | .It Fl -experimental-import-text | |
| 745 | - Enable experimental support for importing modules with \fBwith { type: 'text' }\fR. | ||
| 745 | + Enable experimental support for importing modules with | ||
| 746 | + \fBwith { type: 'text' }\fR. | ||
| 746 | 747 | . | |
| 747 | 748 | .It Fl -experimental-inspector-network-resource | |
| 748 | 749 | Enable experimental support for inspector network resources. | |
@@ -767,9 +768,8 @@ See Package maps for details on the configuration file format and | |||
| 767 | 768 | resolution algorithm. | |
| 768 | 769 | . | |
| 769 | 770 | .It Fl -experimental-print-required-tla | |
| 770 | - If the ES module being \fBrequire()\fR'd contains top-level \fBawait\fR, this flag | ||
| 771 | - allows Node.js to evaluate the module, try to locate the | ||
| 772 | - top-level awaits, and print their location to help users find them. | ||
| 771 | + If the ES module graph cannot be \fBrequire()\fR'd because it contains any top-level \fBawait\fR, | ||
| 772 | + this flag allows Node.js to locate and print their locations. | ||
| 773 | 773 | . | |
| 774 | 774 | .It Fl -experimental-quic | |
| 775 | 775 | Enable experimental support for the QUIC protocol. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,21 @@ | |||
| 1 | + // @node-core/doc-kit configuration for generating and linting the Node.js | ||
| 2 | + // man-page (doc/node.1). | ||
| 3 | + | ||
| 4 | + import { fileURLToPath } from 'node:url'; | ||
| 5 | + | ||
| 6 | + const root = new URL('../../', import.meta.url); | ||
| 7 | + | ||
| 8 | + const fromRoot = (path) => fileURLToPath(new URL(path, root)); | ||
| 9 | + | ||
| 10 | + export default { | ||
| 11 | + target: ['man-page'], | ||
| 12 | + | ||
| 13 | + global: { | ||
| 14 | + input: [fromRoot('doc/api/cli.md')], | ||
| 15 | + output: fromRoot('tools/doc/.manpagecheck'), | ||
| 16 | + | ||
| 17 | + // Point every loadable URL at its local file so no network request is made. | ||
| 18 | + changelog: fromRoot('CHANGELOG.md'), | ||
| 19 | + index: fromRoot('doc/api/index.md'), | ||
| 20 | + }, | ||
| 21 | + }; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments