From 1ce204259277330954892065e82d026312afb5c9 Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Mon, 22 May 2017 23:46:09 +0200 Subject: [PATCH] build: add lint-md-build PR-URL: https://github.com/nodejs/node/pull/12756 Reviewed-By: Refael Ackermann Reviewed-By: Vse Mozhet Byt Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani --- .gitignore | 2 ++ Makefile | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index a9a50fc08b..309ee28a3a 100644 --- a/.gitignore +++ b/.gitignore @@ -106,6 +106,8 @@ deps/npm/node_modules/.bin/ # test artifacts tools/faketime +tools/remark-cli +tools/remark-preset-lint-node icu_config.gypi *.tap diff --git a/Makefile b/Makefile index aa8c865fec..b19057089c 100644 --- a/Makefile +++ b/Makefile @@ -948,7 +948,13 @@ bench: bench-net bench-http bench-fs bench-tls bench-ci: bench -lint-md: +lint-md-build: + if [ ! -d tools/remark-cli/node_modules ]; then \ + cd tools/remark-cli && ../../$(NODE) ../../$(NPM) install; fi + if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \ + cd tools/remark-preset-lint-node && ../../$(NODE) ../../$(NPM) install; fi + +lint-md: lint-md-build @echo "Running Markdown linter..." $(NODE) tools/remark-cli/cli.js -q -f \ ./*.md doc src lib benchmark tools/doc/ tools/icu/