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
|
|
|
|
2011-03-03 08:45:21 -05:00
|
|
|
# Usage:
|
|
|
|
# build.sh MODE
|
|
|
|
#
|
|
|
|
# MODE:
|
2012-12-24 10:44:13 -05:00
|
|
|
# commented Preprocessed, still formated and commented
|
|
|
|
# stripped Preprocessed, formated but without comments
|
2011-03-03 08:45:21 -05:00
|
|
|
|
|
|
|
if [ $# -eq 0 ]
|
|
|
|
then
|
|
|
|
MODE="stripped"
|
|
|
|
else
|
|
|
|
MODE=$1
|
|
|
|
fi
|
|
|
|
|
2011-06-12 14:03:18 -04:00
|
|
|
# Create the dist folder if it does not exist yet.
|
|
|
|
if [ ! -d ../dist/ ]
|
2011-03-03 08:45:21 -05:00
|
|
|
then
|
2011-06-12 14:03:18 -04:00
|
|
|
mkdir ../dist/
|
2011-03-03 08:45:21 -05:00
|
|
|
fi
|
|
|
|
|
2012-11-18 15:25:37 -05:00
|
|
|
./preprocess.sh $MODE ../src/paper.js '{ "browser": true, "parser": "acorn" }' ../src/constants.js ../dist/paper.js
|
2012-11-05 21:11:44 -05:00
|
|
|
#./preprocess.sh $MODE ../src/paper.js '{ "server": true }' ../src/constants.js ../dist/paper-server.js
|