We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent acb499f commit b12d1b6Copy full SHA for b12d1b6
gen_docs.sh
@@ -1,4 +1,20 @@
1
-#!/bin/bash
2
-if [ ! -e gen_docs.disable ]; then
3
- ./node_modules/.bin/jasmine-node docs/spec --noColor && node docs/src/gen-docs.js
+#!/usr/bin/env bash
+
+JASMINE_NODE='jasmine-node'
4
+if ! type -p "$JASMINE_NODE" >/dev/null 2>&1;then
5
+ # Locally (npm)-installed jasmine-node
6
+ local_jasmine='./node_modules/.bin/jasmine-node'
7
8
+ if [[ -x "$local_jasmine" ]];then
9
+ JASMINE_NODE="$local_jasmine"
10
+ else
11
+ echo 'Could not find a locally or globally installed executable of' \
12
+ 'jasmine-node. Try: `npm install jasmine-node`.' >&2
13
+ exit 1
14
+ fi
15
+fi
16
17
+if [[ ! -e gen_docs.disable ]]; then
18
+ echo 'Testing, then building documentation...'
19
+ "$JASMINE_NODE" docs/spec --noColor && node docs/src/gen-docs.js
20
fi
0 commit comments