paper.js/build/build.sh
2011-03-07 00:50:44 +00:00

35 lines
889 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
# compiled Uses Google Closure Compiler to reduce file size even more
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-browser.js "-DBROWSER" $MODE
./preprocess.sh ../src/paper.js ../out/paper.js "" $MODE