Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 101 lines (64 sloc) 2.819 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
#!/bin/sh

echo "Building snack.js"

# build base file
cat src/core.js src/wrap.js src/event.js src/publisher.js src/ajax.js src/element.js > builds/snack.js

# replace %build%
#rev=`git rev-parse head`
#sed "s/%build%/$rev/" builds/snack.js > builds/snack-out.js ; mv builds/snack-out.js builds/snack.js

# compress
uglifyjs builds/snack.js > builds/snack-min.js
gzip -c builds/snack-min.js > builds/snack-min.js.gz

snack=`stat -f %z builds/snack.js`
min=`stat -f %z builds/snack-min.js`
gz=`stat -f %z builds/snack-min.js.gz`

echo " ==> snack.js | $snack bytes"
echo " ==> snack-min.js | $min bytes"
echo " ==> gzipped | $gz bytes"

# just wanted to know the size, delete it now
rm builds/snack-min.js.gz





# echo
# echo "Building snack-qwery.js"

# build base file
cat builds/snack.js vendor/qwery/qwery.js src/engines/qwery.js > builds/snack-qwery.js

# compress
uglifyjs builds/snack-qwery.js > builds/snack-qwery-min.js
gzip -c builds/snack-qwery-min.js > builds/snack-min.js.gz

snack=`stat -f %z builds/snack-qwery.js`
min=`stat -f %z builds/snack-qwery-min.js`
gz=`stat -f %z builds/snack-min.js.gz`

# echo " ==> builds/snack-qwery.js | $snack bytes"
# echo " ==> builds/snack-qwery-min.js | $min bytes"
# echo " ==> gzipped | $gz bytes"

# just wanted to know the size, delete it now
rm builds/snack-min.js.gz





# echo
# echo "Building snack-slick.js"

# build base file
cat builds/snack.js vendor/slick/Source/Slick.Parser.js vendor/slick/Source/Slick.Finder.js src/engines/slick.js > builds/snack-slick.js

# compress
uglifyjs builds/snack-slick.js > builds/snack-slick-min.js
gzip -c builds/snack-slick-min.js > builds/snack-min.js.gz

snack=`stat -f %z builds/snack-slick.js`
min=`stat -f %z builds/snack-slick-min.js`
gz=`stat -f %z builds/snack-min.js.gz`

# echo " ==> builds/snack-slick.js | $snack bytes"
# echo " ==> builds/snack-slick-min.js | $min bytes"
# echo " ==> gzipped | $gz bytes"

# just wanted to know the size, delete it now
rm builds/snack-min.js.gz




# echo
# echo "Building snack-sizzle.js"

# build base file
cat builds/snack.js vendor/sizzle/sizzle.js src/engines/sizzle.js > builds/snack-sizzle.js

# compress
uglifyjs builds/snack-sizzle.js > builds/snack-sizzle-min.js
gzip -c builds/snack-sizzle-min.js > builds/snack-min.js.gz

snack=`stat -f %z builds/snack-sizzle.js`
min=`stat -f %z builds/snack-sizzle-min.js`
gz=`stat -f %z builds/snack-min.js.gz`

# echo " ==> builds/snack-sizzle.js | $snack bytes"
# echo " ==> builds/snack-sizzle-min.js | $min bytes"
# echo " ==> gzipped | $gz bytes"

# just wanted to know the size, delete it now
rm builds/snack-min.js.gz

tar czf docs/snack.tar.gz builds
Something went wrong with that request. Please try again.