Skip to content

Commit

Permalink
build: fix lint-md-build dependency
Browse files Browse the repository at this point in the history
PR-URL: nodejs#18981
Fixes: nodejs#18978
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
joyeecheung authored and MayaLekova committed May 8, 2018
1 parent 08c182b commit b5c962c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1056,15 +1056,18 @@ lint-md-clean:
$(RM) -r tools/remark-preset-lint-node/node_modules
$(RM) tools/.*mdlintstamp

.PHONY: lint-md-build
lint-md-build:
@if [ ! -d tools/remark-cli/node_modules ]; then \
echo "Markdown linter: installing remark-cli into tools/"; \
cd tools/remark-cli && $(call available-node,$(run-npm-install)) fi
@if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \
echo "Markdown linter: installing remark-preset-lint-node into tools/"; \
cd tools/remark-preset-lint-node && $(call available-node,$(run-npm-install)) fi
tools/remark-cli/node_modules: tools/remark-cli/package.json
@echo "Markdown linter: installing remark-cli into tools/"
@cd tools/remark-cli && $(call available-node,$(run-npm-install))

tools/remark-preset-lint-node/node_modules: \
tools/remark-preset-lint-node/package.json
@echo "Markdown linter: installing remark-preset-lint-node into tools/"
@cd tools/remark-preset-lint-node && $(call available-node,$(run-npm-install))

.PHONY: lint-md-build
lint-md-build: tools/remark-cli/node_modules \
tools/remark-preset-lint-node/node_modules

.PHONY: lint-md
ifneq ("","$(wildcard tools/remark-cli/node_modules/)")
Expand Down

0 comments on commit b5c962c

Please sign in to comment.