metamaps--metamaps/bin/build-apidocs.sh
Devin Howard 7eae8deacb revamp HTML template a bit for api docs (#757)
* my_tokens endpoint moved to normal index

* remove secured_by from metacodes/users

* ch ch ch changes

* mess with template

* fix securedBy

* convenience open

* gross authentication notes at the top of every endpoint

* better ordering

* move login tutorials into security tab

* oauth tutorial

* getting closer

* remove unneeded Endpoints header

* ok looks OK
2016-10-12 13:54:43 -04:00

17 lines
408 B
Bash
Executable file

#!/bin/bash
# Note: you need to run `npm install` before using this script or raml2html won't be installed
OLD_DIR=$(pwd)
cd $(dirname $0)/..
if [[ ! -x ./node_modules/.bin/raml2html ]]; then
npm install
fi
./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