#!/bin/bash 

# install yuidoc using the steps mentioned here -> http://yui.github.io/yuidoc/##install
# or tl;dr just do npm install -g yuidocjs

config=target/classes/yuidoc.json

# Generate docs
function gen {
  yuidoc -e .ts -c $config
}

# starts yuidoc in server mode
function server {
  yuidoc -e .ts -c $config --server
}

# Just evaluates JSDoc comments
function lint {
  yuidoc -e .ts -c $config --lint
}

action='lint'

case $1 in
  -s|--server)
  action='server'
  ;;
  -g|--generate)
  action='gen'
  ;;
esac

echo "doing action $action"
$action


