2016-10-04 06:02:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Note: you need to run `npm install` before using this script or raml2html won't be installed
|
|
|
|
|
2016-10-12 17:54:43 +00:00
|
|
|
OLD_DIR=$(pwd)
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
2016-10-04 08:21:09 +00:00
|
|
|
if [[ ! -x ./node_modules/.bin/raml2html ]]; then
|
|
|
|
npm install
|
|
|
|
fi
|
|
|
|
|
2016-10-12 17:54:43 +00:00
|
|
|
./node_modules/.bin/raml2html -i ./doc/api/api.raml -o ./public/api/index.html -t doc/api/templates/template.nunjucks
|
|
|
|
if [[ -x $(which open) ]]; then
|
|
|
|
open public/api/index.html
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $OLD_DIR
|