paper.js/build/build.sh
2011-05-22 18:45:49 +02:00

40 lines
No EOL
1,008 B
Bash
Executable file

# Paper.js
#
# This file is part of Paper.js, a JavaScript Vector Graphics Library,
# based on Scriptographer.org and designed to be largely API compatible.
# http://scriptographer.org/
#
# Copyright (c) 2011, Juerg Lehni & Jonathan Puckey
# http://lehni.org/ & http://jonathanpuckey.com/
#
# All rights reserved. See LICENSE file for details.
# Usage:
# build.sh MODE
#
# MODE:
# commented Preprocessed but still formated and commented
# stripped Formated but without comments (default)
# compressed No comments and no whitespaces
# uglified Uses UglifyJS to further reduce file size
if [ $# -eq 0 ]
then
MODE="stripped"
else
MODE=$1
fi
# Create the out folder if it does not exist yet.
if [ ! -d ../out/ ]
then
mkdir ../out/
fi
./preprocess.sh ../src/paper.js ../out/paper.js "-DBROWSER" $MODE
./preprocess.sh ../src/paper.js ../out/paper-server.js "-DSERVER" $MODE
# Generate documentation
# TODO: switch this on with a flag
cd jsdoc-toolkit
java -jar jsrun.jar app/run.js -c=conf/paperjs.conf