Skip to content

Commit 942a9ed

Browse files
refackevanlucas
authored andcommitted
tools,build: allow build without remark-cli
PR-URL: #16893 Reviewed-By: Joyee Cheung <[email protected]>
1 parent a4557f2 commit 942a9ed

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,7 @@ lint-md-build:
984984
echo "Markdown linter: installing remark-preset-lint-node into tools/"; \
985985
cd tools/remark-preset-lint-node && ../../$(NODE) ../../$(NPM) install; fi
986986

987+
ifneq ("","$(wildcard tools/remark-cli/node_modules/)")
987988
LINT_MD_TARGETS = src lib benchmark tools/doc tools/icu
988989
LINT_MD_ROOT_DOCS := $(wildcard *.md)
989990
LINT_MD_FILES := $(shell find $(LINT_MD_TARGETS) -type f \
@@ -1002,7 +1003,12 @@ tools/.miscmdlintstamp: $(LINT_MD_FILES)
10021003

10031004
tools/.mdlintstamp: tools/.miscmdlintstamp tools/.docmdlintstamp
10041005

1005-
lint-md: | lint-md-build tools/.mdlintstamp
1006+
lint-md: | tools/.mdlintstamp
1007+
else
1008+
lint-md:
1009+
@echo "The markdown linter is not installed."
1010+
@echo "To install (requires internet access) run: $ make lint-md-build"
1011+
endif
10061012

10071013
LINT_JS_TARGETS = benchmark doc lib test tools
10081014
LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \

0 commit comments

Comments
 (0)