Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit 5c24232

Browse files
author
Jeremy Wiebe
committed
Fix lint-md when running on node 6
1 parent 0b83b8c commit 5c24232

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

docs/bin/lint-md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ done
1414
DOCS_DIR="$(cd "$(dirname "$BIN")/.." && pwd)"
1515
REMARK_RC="$DOCS_DIR/remarkrc"
1616

17-
# This is tricky. `remark` is a dep of mobify-code-style
18-
# and so won't show up in `node_modules/.bin` of a project
19-
# that uses mobify-code-style. We have to move into the
20-
# the mobify-code-style /docs directory and find the npm
21-
# bin directory relative that _that_ to find remark!
22-
REMARK_CLI="$(cd "$DOCS_DIR" && npm bin)/remark"
17+
if [[ $(node -v) =~ ^v4 ]]; then
18+
# Node v4!!
19+
# This is tricky. `remark` is a dep of mobify-code-style
20+
# and so won't show up in `node_modules/.bin` of a project
21+
# that uses mobify-code-style. We have to move into the
22+
# the mobify-code-style /docs directory and find the npm
23+
# bin directory relative that _that_ to find remark!
24+
REMARK_CLI="$(cd "$DOCS_DIR" && npm bin)/remark"
25+
else
26+
REMARK_CLI="$(npm bin)/remark"
27+
fi
2328

2429
$REMARK_CLI --rc-path $REMARK_RC "$@"

0 commit comments

Comments
 (0)