2011-06-25 16:34:59 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-01-28 21:03:27 -05:00
|
|
|
# Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
|
|
|
|
# http://paperjs.org/
|
2011-05-31 17:17:13 -04:00
|
|
|
#
|
2013-01-28 21:03:27 -05:00
|
|
|
# Copyright (c) 2011 - 2013, Juerg Lehni & Jonathan Puckey
|
2011-05-31 17:17:13 -04:00
|
|
|
# http://lehni.org/ & http://jonathanpuckey.com/
|
|
|
|
#
|
2011-07-01 06:17:45 -04:00
|
|
|
# Distributed under the MIT license. See LICENSE file for details.
|
|
|
|
#
|
|
|
|
# All rights reserved.
|
2011-05-31 17:17:13 -04:00
|
|
|
|
|
|
|
# Generate documentation
|
2011-06-01 06:19:15 -04:00
|
|
|
#
|
|
|
|
# MODE:
|
2011-06-22 17:39:51 -04:00
|
|
|
# docs Generates the JS API docs - Default
|
|
|
|
# serverdocs Generates the website templates for the online JS API docs
|
2011-06-01 06:19:15 -04:00
|
|
|
|
|
|
|
if [ $# -eq 0 ]
|
|
|
|
then
|
|
|
|
MODE="docs"
|
|
|
|
else
|
|
|
|
MODE=$1
|
|
|
|
fi
|
2011-05-31 17:17:13 -04:00
|
|
|
|
|
|
|
cd jsdoc-toolkit
|
2011-06-01 13:49:50 -04:00
|
|
|
java -jar jsrun.jar app/run.js -c=conf/$MODE.conf -D="renderMode:$MODE"
|
2011-06-02 14:50:43 -04:00
|
|
|
cd ..
|
|
|
|
|
2011-07-29 19:38:30 -04:00
|
|
|
if [ $MODE = "docs" ]
|
2011-06-13 18:50:43 -04:00
|
|
|
then
|
|
|
|
# Build paper.js library for documentation
|
2013-02-28 20:41:02 -05:00
|
|
|
./preprocess.sh stripped ../src/paper.js "-d '{ \"browser\": true }' -i '../src/constants.js'" ../dist/docs/resources/js/paper.js
|
2011-06-13 18:50:43 -04:00
|
|
|
fi
|