paper.js/build/build.sh

39 lines
904 B
Bash
Raw Normal View History

2011-06-25 16:34:59 -04:00
#!/bin/sh
2011-03-06 19:50:44 -05:00
# 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/
#
2011-07-01 06:17:45 -04:00
# Distributed under the MIT license. See LICENSE file for details.
#
# All rights reserved.
2011-03-06 19:50:44 -05:00
# Usage:
# build.sh MODE
#
# MODE:
# commented Preprocessed but still formated and commented
# stripped Formated but without comments (default)
# compressed Uses UglifyJS to reduce file size
if [ $# -eq 0 ]
then
MODE="stripped"
else
MODE=$1
fi
# Create the dist folder if it does not exist yet.
if [ ! -d ../dist/ ]
then
mkdir ../dist/
fi
./preprocess.sh $MODE ../src/paper.js ../dist/paper.js '{ "browser": true }'
#./preprocess.sh $MODE ../src/paper.js ../dist/paper-server.js '{ "server": true }'