Skip to content

Commit d18437d

Browse files
committed
Update docs and support searching in a specified directory
1 parent addc2d7 commit d18437d

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

tools/make/lib/ls/pkgs/names.mk

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,24 @@ LIST_PACKAGE_NAMES ?= $(TOOLS_PKGS_DIR)/pkgs/names/bin/cli
2424
# Define the command flags:
2525
LIST_PACKAGE_NAMES_FLAGS ?=
2626

27+
# Define the directory from which to search for packages:
28+
LIST_PACKAGE_NAMES_DIR ?= $(SRC_DIR)
2729

28-
# TARGETS #
2930

30-
# List all package names.
31-
#
32-
# This target prints a list of all package names.
31+
# RULES #
3332

33+
#/
34+
# Prints a list of all package names.
35+
#
36+
# @param {string} [LIST_PACKAGE_NAMES_DIR] - absolute path of the directory from which to search for packages (default: source directory)
37+
#
38+
# @example
39+
# make list-pkgs-names
40+
#
41+
# @example
42+
# make list-pkgs-names LIST_PACKAGE_NAMES_DIR=$PWD/lib/node_modules/\@stdlib/utils
43+
#/
3444
list-pkgs-names: $(LIST_PACKAGE_NAMES) $(NODE_MODULES)
35-
$(QUIET) NODE_PATH="$(NODE_PATH)" $(NODE) $(LIST_PACKAGE_NAMES) $(LIST_PACKAGE_NAMES_FLAGS) $(SRC_DIR)
45+
$(QUIET) NODE_PATH="$(NODE_PATH)" $(NODE) $(LIST_PACKAGE_NAMES) $(LIST_PACKAGE_NAMES_FLAGS) $(LIST_PACKAGE_NAMES_DIR)
3646

3747
.PHONY: list-pkgs-names

0 commit comments

Comments
 (0)