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