Skip to content

Commit c2daecc

Browse files
committed
Update repl recipe to use stdlib CLI
1 parent 0839a87 commit c2daecc

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tools/make/lib/repl/Makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11

22
# VARIABLES #
33

4+
# Define the command for Node:
5+
NODE ?= node
6+
47
# Define the Node environment:
58
NODE_ENV_REPL ?= $(NODE_ENV)
69

710
# Define the Node path:
811
NODE_PATH_REPL ?= $(NODE_PATH)
912

10-
# Define the path of the REPL executable:
11-
REPL ?= $(LOCAL_BIN_DIR)/repl
13+
# Define the path of the executable:
14+
STDLIB ?= $(LOCAL_BIN_DIR)/cli
15+
16+
# Define the command to launch the REPL:
17+
REPL ?= repl
1218

13-
# Define any command-line options to use when invoking the REPL executable:
19+
# Define any command-line options to use when invoking the executable:
1420
REPL_FLAGS ?=
1521

1622
# Define the path of the directory in which to run the REPL:
@@ -23,10 +29,10 @@ REPL_DIR ?= $(ROOT_DIR)
2329
#
2430
# This target starts a REPL environment.
2531

26-
repl: $(NODE_MODULES) $(REPL)
32+
repl: $(NODE_MODULES) $(STDLIB)
2733
@cd $(REPL_DIR); \
2834
NODE_ENV=$(NODE_ENV_REPL) \
2935
NODE_PATH=$(NODE_PATH_REPL) \
30-
$(REPL) $(REPL_FLAGS)
36+
$(NODE) $(STDLIB) $(REPL) -- $(REPL_FLAGS)
3137

3238
.PHONY: repl

0 commit comments

Comments
 (0)