File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change 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
1+ #! /usr/bin/env bash
2+
3+ 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
420fi
You can’t perform that action at this time.
0 commit comments