Skip to content

Commit 04ce2fb

Browse files
committed
Add recipe to list add-ons
1 parent cdf725b commit 04ce2fb

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

tools/make/lib/ls/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ include $(TOOLS_MAKE_LIB_DIR)/ls/benchmarks.mk
5959
include $(TOOLS_MAKE_LIB_DIR)/ls/examples.mk
6060
include $(TOOLS_MAKE_LIB_DIR)/ls/markdown.mk
6161
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs.mk
62+
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs_addons.mk
6263
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs_clis.mk
6364
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs_names.mk
6465
include $(TOOLS_MAKE_LIB_DIR)/ls/pkgs_namespaces.mk

tools/make/lib/ls/pkgs_addons.mk

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
# VARIABLES #
3+
4+
# Define the command for `node`:
5+
NODE ?= node
6+
7+
# Define the root directory from which to search for packages:
8+
PACKAGES_DIR ?= $(ROOT_DIR)/lib/node_modules
9+
10+
# Define the path of the executable:
11+
LIST_PACKAGE_ADDONS ?= $(TOOLS_DIR)/pkgs/addons/bin/cli
12+
13+
# Define the command flags:
14+
LIST_PACKAGE_ADDONS_FLAGS ?=
15+
16+
17+
# TARGETS #
18+
19+
# List all add-ons.
20+
#
21+
# This target prints a list of all add-ons.
22+
23+
list-pkgs-addons: $(LIST_PACKAGE_ADDONS) $(NODE_MODULES)
24+
$(QUIET) $(NODE) $(LIST_PACKAGE_ADDONS) $(LIST_PACKAGE_ADDONS_FLAGS) $(PACKAGES_DIR)
25+
26+
.PHONY: list-pkgs-addons

tools/make/usage.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Usage: make <cmd>
1414
make list-pkgs-names List all package names.
1515
make list-pkgs-namespaces List all package namespaces.
1616
make list-pkgs-clis List all package command-line interfaces.
17+
make list-pkgs-addons List all packages with native add-ons.
1718
make list-pkgs-tree List all packages as a tree.
1819
make list-pkgs-installed List installed packages.
1920
make list-licenses List licenses of installed package dependencies.

0 commit comments

Comments
 (0)