Skip to content

fix(build): add new make rule to build docs #6584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#########
package.json.copy
.stdlibrc
sources.txt

# Directories #
###############
Expand Down
8 changes: 7 additions & 1 deletion tools/make/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.

> Development utility.

This project uses [`make`][make] as its development utility. For an overview of `make`, see the `make` [manual][make].
This project uses [`make`][make] as its development utility. For an overview of `make`, see the `make` [manual][make].

## Usage

Expand Down Expand Up @@ -405,6 +405,12 @@ To generate documentation from [JSDoc][jsdoc] source code comments,
$ make docs-src
```

sometimes you might get an error `Argument listing too long` then use,

```bash
$ make src-docs-out
```

To view the documentation in a local web browser,

```bash
Expand Down
12 changes: 12 additions & 0 deletions tools/make/lib/docs/jsdoc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ jsdoc-html: $(NODE_MODULES)

.PHONY: jsdoc-html

# Generate JSDoc HTML documentation.
#
# See issue #6583

jsdoc-html-out: $(NODE_MODULES)
$(QUIET) $(DELETE) $(DELETE_FLAGS) $(JSDOC_HTML_OUT)
$(QUIET) $(MKDIR_RECURSIVE) $(JSDOC_HTML_OUT)
$(QUIET) find . -type f -name "$(SOURCES_PATTERN)" > sources.txt
$(QUIET) cat sources.txt | xargs $(JSDOC) $(JSDOC_HTML_FLAGS) $(JSDOC_TYPEDEF)

.PHONY: jsdoc-html-out


# Generate JSDoc JSON.
#
Expand Down
17 changes: 17 additions & 0 deletions tools/make/lib/docs/src.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ endif
.PHONY: src-docs


# Generate source documentation.
#
# use this if you get error
# "Argument Listing too long"
#
# ```bash
# make src-docs-out
# ```

src-docs-out:
ifeq ($(SRC_DOC_GENERATOR), jsdoc)
$(QUIET) $(MAKE) -f $(this_file) jsdoc-html-out
endif

.PHONY: src-docs-out


# View HTML documentation.
#
# This target opens source HTML documentation in a local web browser.
Expand Down