Skip to content

Commit e263059

Browse files
committed
fix(build): add new make rule to build docs
Add the rule to avoid hitting shell limits. Fixes: #6583 Private-ref: #6583 --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent c82ae2b commit e263059

File tree

4 files changed

+37
-1
lines changed

4 files changed

+37
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#########
2121
package.json.copy
2222
.stdlibrc
23+
sources.txt
2324

2425
# Directories #
2526
###############

tools/make/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ limitations under the License.
2222

2323
> Development utility.
2424
25-
This project uses [`make`][make] as its development utility. For an overview of `make`, see the `make` [manual][make].
25+
This project uses [`make`][make] as its development utility. For an overview of `make`, see the `make` [manual][make].
2626

2727
## Usage
2828

@@ -405,6 +405,12 @@ To generate documentation from [JSDoc][jsdoc] source code comments,
405405
$ make docs-src
406406
```
407407

408+
sometimes you might get an error `Argument listing too long` then use,
409+
410+
```bash
411+
$ make src-docs-out
412+
```
413+
408414
To view the documentation in a local web browser,
409415

410416
```bash

tools/make/lib/docs/jsdoc.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,18 @@ jsdoc-html: $(NODE_MODULES)
8585

8686
.PHONY: jsdoc-html
8787

88+
# Generate JSDoc HTML documentation.
89+
#
90+
# See issue #6583
91+
92+
jsdoc-html-out: $(NODE_MODULES)
93+
$(QUIET) $(DELETE) $(DELETE_FLAGS) $(JSDOC_HTML_OUT)
94+
$(QUIET) $(MKDIR_RECURSIVE) $(JSDOC_HTML_OUT)
95+
$(QUIET) find . -type f -name "$(SOURCES_PATTERN)" > sources.txt
96+
$(QUIET) cat sources.txt | xargs $(JSDOC) $(JSDOC_HTML_FLAGS) $(JSDOC_TYPEDEF)
97+
98+
.PHONY: jsdoc-html-out
99+
88100

89101
# Generate JSDoc JSON.
90102
#

tools/make/lib/docs/src.mk

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@ endif
4747
.PHONY: src-docs
4848

4949

50+
# Generate source documentation.
51+
#
52+
# use this if you get error
53+
# "Argument Listing too long"
54+
#
55+
# ```bash
56+
# make src-docs-out
57+
# ```
58+
59+
src-docs-out:
60+
ifeq ($(SRC_DOC_GENERATOR), jsdoc)
61+
$(QUIET) $(MAKE) -f $(this_file) jsdoc-html-out
62+
endif
63+
64+
.PHONY: src-docs-out
65+
66+
5067
# View HTML documentation.
5168
#
5269
# This target opens source HTML documentation in a local web browser.

0 commit comments

Comments
 (0)