Skip to content
Newer
Older
100644 59 lines (49 sloc) 1.82 KB
358de81 @jeremyckahn Added local build functionality.
authored Nov 30, 2011
1 #!/bin/bash
2
ffc29df @jeremyckahn Made a build script. Built v0.1.0.
authored Nov 6, 2011
3 # Call this script like this:
358de81 @jeremyckahn Added local build functionality.
authored Dec 1, 2011
4 # $: sh build.sh version_number [local_path_to_compiler]
ffc29df @jeremyckahn Made a build script. Built v0.1.0.
authored Nov 7, 2011
5
6 echo \
7 "/**
ab8cfce @jeremyckahn Tweaked the build header.
authored Nov 6, 2011
8 * Rekapi - Rewritten Kapi. v${1}
ffc29df @jeremyckahn Made a build script. Built v0.1.0.
authored Nov 7, 2011
9 * By Jeremy Kahn - jeremyckahn@gmail.com
ab8cfce @jeremyckahn Tweaked the build header.
authored Nov 7, 2011
10 * https://github.com/jeremyckahn/rekapi
ffc29df @jeremyckahn Made a build script. Built v0.1.0.
authored Nov 7, 2011
11 *
2708202 @jeremyckahn Made the build script fancier.
authored Nov 6, 2011
12 * Make fun keyframe animations with JavaScript.
ffc29df @jeremyckahn Made a build script. Built v0.1.0.
authored Nov 7, 2011
13 * Dependencies: Underscore.js (https://github.com/documentcloud/underscore), Shifty.js (https://github.com/jeremyckahn/shifty)
14 * MIT Lincense. This code free to use, modify, distribute and enjoy.
15 */" | cat > /tmp/rekapi.header.js
16
17 cat /tmp/rekapi.header.js \
18 src/rekapi.core.js \
adc7b33 @jeremyckahn Added a build script and built.
authored Nov 6, 2011
19 src/rekapi.actor.js \
2e4ef19 @jeremyckahn Added DOM compatibility. v.0.2.0.
authored Nov 19, 2011
20 src/rekapi.dom.js \
adc7b33 @jeremyckahn Added a build script and built.
authored Nov 7, 2011
21 src/rekapi.canvas.js \
f736006 @jeremyckahn This is a complete rearchitecture of the internals.
authored Jan 14, 2012
22 src/rekapi.keyframeprops.js \
f77db43 @jeremyckahn Adds .toCSS() exporting functionality.
authored Apr 1, 2012
23 ext/to-css/rekapi.to-css.js \
adc7b33 @jeremyckahn Added a build script and built.
authored Nov 7, 2011
24 > dist/rekapi.js
25
26 in=dist/rekapi.js
27 out=/tmp/rekapi.compiled.js
28
358de81 @jeremyckahn Added local build functionality.
authored Dec 1, 2011
29 # If a local path to the Closure compiler was specified, use that.
30 if [ $2 ]; then
31 java -jar ${2} --js=$in --js_output_file=$out
32 else
33 # Otherwise curl out to Google's.
34 curl -s \
35 -d compilation_level=SIMPLE_OPTIMIZATIONS \
36 -d output_format=text \
37 -d output_info=compiled_code \
38 --data-urlencode "js_code@${in}" \
39 http://closure-compiler.appspot.com/compile \
40 > $out
41 fi
adc7b33 @jeremyckahn Added a build script and built.
authored Nov 7, 2011
42
ffc29df @jeremyckahn Made a build script. Built v0.1.0.
authored Nov 7, 2011
43 cat /tmp/rekapi.header.js /tmp/rekapi.compiled.js > dist/rekapi.min.js
44 cp lib/underscore/underscore-min.js dist/underscore.js
07b4592 @jeremyckahn Fixes a build script error.
authored Jan 14, 2012
45 cp lib/shifty/dist/shifty.min.js dist/shifty.js
717ca7d @jeremyckahn Fixes a build bug.
authored Jan 14, 2012
46
47 cat /tmp/rekapi.header.js > dist/rekapi.bundle.min.js
48 cat dist/underscore.js >> dist/rekapi.bundle.min.js
49 # Semicolon insertions fix bizarre Closure bugs. They separate the libraries.
50 echo ";" >> dist/rekapi.bundle.min.js
51 cat dist/shifty.js >> dist/rekapi.bundle.min.js
52 echo ";" >> dist/rekapi.bundle.min.js
53 cat dist/rekapi.min.js >> dist/rekapi.bundle.min.js
2708202 @jeremyckahn Made the build script fancier.
authored Nov 7, 2011
54
55 echo 'Yay! Rekapi was built. The file size, minified and gzipped, is:'
56 echo `cat dist/rekapi.min.js | gzip -9f | wc -c` "bytes"
cae2399 @jeremyckahn Added onPlayStateChange event. Also:
authored Nov 29, 2011
57
58 echo ${1} > version.txt
Something went wrong with that request. Please try again.