2013-05-30 15:47:47 -07:00
|
|
|
#!/bin/bash
|
2011-06-25 22:34:59 +02:00
|
|
|
|
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
|
|
|
#
|
2015-12-27 18:09:25 +01:00
|
|
|
# Copyright (c) 2011 - 2016, Juerg Lehni & Jonathan Puckey
|
2014-01-04 01:47:16 +01:00
|
|
|
# http://scratchdisk.com/ & http://jonathanpuckey.com/
|
2011-05-31 22:17:13 +01:00
|
|
|
#
|
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:
|
2014-08-16 19:24:54 +02: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
|
2014-08-16 19:24:54 +02:00
|
|
|
MODE="docs"
|
2011-06-01 12:19:15 +02:00
|
|
|
else
|
2014-08-16 19:24:54 +02:00
|
|
|
MODE=$1
|
2011-06-01 12:19:15 +02:00
|
|
|
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
|
2014-08-16 19:24:54 +02:00
|
|
|
# Build paper.js library for documentation
|
|
|
|
./preprocess.sh stripped ../src/paper.js "-o '{ \"browser\": true }' -i '../src/constants.js'" ../dist/docs/assets/js/paper.js
|
2011-06-13 23:50:43 +01:00
|
|
|
fi
|