mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Streamline build scripts.
This commit is contained in:
parent
1a37bb7252
commit
55cc668cc2
3 changed files with 7 additions and 7 deletions
|
@ -30,5 +30,5 @@ then
|
|||
mkdir ../dist/
|
||||
fi
|
||||
|
||||
./preprocess.sh $MODE ../src/paper.js '{ "browser": true, "parser": "acorn" }' ../src/constants.js ../dist/paper.js
|
||||
#./preprocess.sh $MODE ../src/paper.js '{ "server": true }' ../src/constants.js ../dist/paper-server.js
|
||||
./preprocess.sh $MODE ../src/paper.js "-d '{ \"browser\": true }' -i '../src/constants.js'" ../dist/paper.js
|
||||
#./preprocess.sh $MODE ../src/paper.js "-d '{ \"server\": true }' -i '../src/constants.js'" ../dist/paper-server.js
|
||||
|
|
|
@ -30,5 +30,5 @@ cd ..
|
|||
if [ $MODE = "docs" ]
|
||||
then
|
||||
# Build paper.js library for documentation
|
||||
./preprocess.sh stripped ../src/paper.js '{ "browser": true, "parser": "acorn" }' ../src/constants.js ../dist/docs/resources/js/paper.js
|
||||
./preprocess.sh stripped ../src/paper.js "-d '{ \"browser\": true }' -i '../src/constants.js'" ../dist/docs/resources/js/paper.js
|
||||
fi
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# are preserved or stripped and whitespaces are compressed.
|
||||
#
|
||||
# Usage:
|
||||
# preprocess.sh MODE SOURCE DEFINITIONS PREPRO_INCLUDE DESTINATION
|
||||
# preprocess.sh MODE SOURCE ARGUMENTS DESTINATION
|
||||
#
|
||||
# MODE:
|
||||
# commented Preprocessed, still formated and commented
|
||||
|
@ -27,13 +27,13 @@
|
|||
VERSION=0.3
|
||||
DATE=$(git log -1 --pretty=format:%ad)
|
||||
|
||||
COMMAND="./prepro.js -d '{ \"version\": $VERSION, \"date\": \"$DATE\" }' -d '$3' -i '$4' $2"
|
||||
COMMAND="./prepro.js -d '{ \"version\": $VERSION, \"date\": \"$DATE\", \"parser\": \"acorn\", \"svg\": true }' $3 $2"
|
||||
|
||||
case $1 in
|
||||
commented)
|
||||
eval $COMMAND > $5
|
||||
eval $COMMAND > $4
|
||||
;;
|
||||
stripped)
|
||||
eval "$COMMAND -c" > $5
|
||||
eval "$COMMAND -c" > $4
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue