mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -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/
|
mkdir ../dist/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./preprocess.sh $MODE ../src/paper.js '{ "browser": true, "parser": "acorn" }' ../src/constants.js ../dist/paper.js
|
./preprocess.sh $MODE ../src/paper.js "-d '{ \"browser\": true }' -i '../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 '{ \"server\": true }' -i '../src/constants.js'" ../dist/paper-server.js
|
||||||
|
|
|
@ -30,5 +30,5 @@ cd ..
|
||||||
if [ $MODE = "docs" ]
|
if [ $MODE = "docs" ]
|
||||||
then
|
then
|
||||||
# Build paper.js library for documentation
|
# 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
|
fi
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# are preserved or stripped and whitespaces are compressed.
|
# are preserved or stripped and whitespaces are compressed.
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# preprocess.sh MODE SOURCE DEFINITIONS PREPRO_INCLUDE DESTINATION
|
# preprocess.sh MODE SOURCE ARGUMENTS DESTINATION
|
||||||
#
|
#
|
||||||
# MODE:
|
# MODE:
|
||||||
# commented Preprocessed, still formated and commented
|
# commented Preprocessed, still formated and commented
|
||||||
|
@ -27,13 +27,13 @@
|
||||||
VERSION=0.3
|
VERSION=0.3
|
||||||
DATE=$(git log -1 --pretty=format:%ad)
|
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
|
case $1 in
|
||||||
commented)
|
commented)
|
||||||
eval $COMMAND > $5
|
eval $COMMAND > $4
|
||||||
;;
|
;;
|
||||||
stripped)
|
stripped)
|
||||||
eval "$COMMAND -c" > $5
|
eval "$COMMAND -c" > $4
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue