Skip to content

Commit e35096f

Browse files
committed
Update source docs
1 parent f98288c commit e35096f

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

tools/make/lib/examples/javascript.mk

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,23 @@
1818

1919
# RULES #
2020

21-
# Run examples.
21+
#/
22+
# Runs JavaScript examples consecutively.
2223
#
23-
# This target runs a list of examples in sequential order. Note that we assume the examples can be run using Node.js.
24-
24+
# ## Notes
25+
#
26+
# - This rule is useful when wanting to glob for JavaScript examples files (e.g., run all JavaScript examples for a particular package).
27+
# - This rule **assumes** that examples files can be run using Node.js.
28+
#
29+
#
30+
# @param {string} [EXAMPLES_FILTER] - file path pattern (e.g., `.*/math/base/special/abs/.*`)
31+
#
32+
# @example
33+
# make examples-javascript
34+
#
35+
# @example
36+
# make examples-javascript EXAMPLES_FILTER=.*/strided/common/.*
37+
#/
2538
examples-javascript: $(NODE_MODULES)
2639
$(QUIET) $(FIND_EXAMPLES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
2740
echo ""; \
@@ -33,11 +46,20 @@ examples-javascript: $(NODE_MODULES)
3346

3447
.PHONY: examples-javascript
3548

36-
37-
# Run examples.
49+
#/
50+
# Runs a specified list of JavaScript examples consecutively.
3851
#
39-
# This target runs a specified list of examples in sequential order. Note that we assume the examples can be run using Node.js.
40-
52+
# ## Notes
53+
#
54+
# - This rule is useful when wanting to run a list of JavaScript examples files generated by some other command (e.g., a list of changed JavaScript examples files obtained via `git diff`).
55+
# - This rule **assumes** that examples files can be run using Node.js.
56+
#
57+
#
58+
# @param {string} FILES - list of JavaScript example file paths
59+
#
60+
# @example
61+
# make examples-javascript-files FILES='/foo/example.js /bar/example.js'
62+
#/
4163
examples-javascript-files: $(NODE_MODULES)
4264
$(QUIET) for file in $(FILES); do \
4365
echo ""; \

0 commit comments

Comments
 (0)