mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
42 lines
1,021 B
Bash
Executable file
42 lines
1,021 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# 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/
|
|
#
|
|
# Distributed under the MIT license. See LICENSE file for details.
|
|
#
|
|
# All rights reserved.
|
|
|
|
# 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
|
|
|
|
VERSION=0.2
|
|
DATE=$(git log -1 --pretty=format:%ad)
|
|
|
|
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 "-DBROWSER -DVERSION=$VERSION -DDATE='$DATE'"
|
|
#./preprocess.sh $MODE ../src/paper.js ../dist/paper-server.js "-DSERVER"
|