build.sh 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/bash
  2. files=( \
  3. jquery-jvectormap.js \
  4. jquery-mousewheel.js \
  5. lib/jvectormap.js \
  6. lib/abstract-element.js \
  7. lib/abstract-canvas-element.js \
  8. lib/abstract-shape-element.js \
  9. lib/svg-element.js \
  10. lib/svg-group-element.js \
  11. lib/svg-canvas-element.js \
  12. lib/svg-shape-element.js \
  13. lib/svg-path-element.js \
  14. lib/svg-circle-element.js \
  15. lib/vml-element.js \
  16. lib/vml-group-element.js \
  17. lib/vml-canvas-element.js \
  18. lib/vml-shape-element.js \
  19. lib/vml-path-element.js \
  20. lib/vml-circle-element.js \
  21. lib/vector-canvas.js \
  22. lib/simple-scale.js \
  23. lib/ordinal-scale.js \
  24. lib/numeric-scale.js \
  25. lib/color-scale.js \
  26. lib/data-series.js \
  27. lib/proj.js \
  28. lib/world-map.js \
  29. )
  30. baseDir=`dirname $0`
  31. counter=0
  32. while [ $counter -lt ${#files[@]} ]; do
  33. files[$counter]="$baseDir/${files[$counter]}"
  34. let counter=counter+1
  35. done
  36. if [ -z "$1" ]
  37. then
  38. minified=jquery.jvectormap.min.js
  39. else
  40. minified=$1
  41. fi
  42. if [ -a $minified ]
  43. then
  44. rm $minified
  45. fi
  46. cat ${files[*]} >> $minified
  47. uglifyjs --overwrite $minified