mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-10 15:54:42 +00:00
fix(docs): Making sure gen_docs.sh looks for a globally installed copy of jasmine-node as well as local.
This commit is contained in:
parent
92304323b1
commit
3051beba2f
1 changed files with 19 additions and 3 deletions
22
gen_docs.sh
22
gen_docs.sh
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
if [ ! -e gen_docs.disable ]; then
|
|
||||||
./node_modules/.bin/jasmine-node docs/spec --noColor && node docs/src/gen-docs.js
|
JASMINE_NODE='jasmine-node'
|
||||||
|
if ! type -p "$JASMINE_NODE" >/dev/null 2>&1;then
|
||||||
|
# Locally (npm)-installed jasmine-node
|
||||||
|
local_jasmine='./node_modules/.bin/jasmine-node'
|
||||||
|
|
||||||
|
if [[ -x "$local_jasmine" ]];then
|
||||||
|
JASMINE_NODE="$local_jasmine"
|
||||||
|
else
|
||||||
|
echo 'Could not find a locally or globally installed executable of' \
|
||||||
|
'jasmine-node. Try: `npm install jasmine-node`.' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -e gen_docs.disable ]]; then
|
||||||
|
echo 'Testing, then building documentation...'
|
||||||
|
"$JASMINE_NODE" docs/spec --noColor && node docs/src/gen-docs.js
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue