build 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. # Remove old minified version
  3. rm pandora.min.js
  4. # Package singletons
  5. cat pandora/singletons/Enums.js > build.js
  6. cat pandora/singletons/Easings.js >> build.js
  7. cat pandora/singletons/Collisions.js >> build.js
  8. # Package handlers
  9. cat pandora/handlers/GameHandler.js >> build.js
  10. cat pandora/handlers/AssetHandler.js >> build.js
  11. # Package components
  12. cat pandora/components/Component.js >> build.js
  13. cat pandora/components/Color.js >> build.js
  14. cat pandora/components/Vector2.js >> build.js
  15. cat pandora/components/Signal.js >> build.js
  16. cat pandora/components/Shape.js >> build.js
  17. cat pandora/components/Rect.js >> build.js
  18. cat pandora/components/Ellipse.js >> build.js
  19. # Package resources
  20. cat pandora/resources/Resource.js >> build.js
  21. cat pandora/resources/AudioRes.js >> build.js
  22. cat pandora/resources/FontRes.js >> build.js
  23. cat pandora/resources/TextureRes.js >> build.js
  24. cat pandora/resources/SpriteFrames.js >> build.js
  25. # Package GameObjects
  26. cat pandora/game_objects/GameObject.js >> build.js
  27. cat pandora/game_objects/AudioPlayer.js >> build.js
  28. cat pandora/game_objects/Timer.js >> build.js
  29. cat pandora/game_objects/Tween.js >> build.js
  30. # Package 2d Objects
  31. cat pandora/game_objects/2d_objects/Object2D.js >> build.js
  32. cat pandora/game_objects/2d_objects/Sprite2D.js >> build.js
  33. cat pandora/game_objects/2d_objects/AnimatedSprite2D.js >> build.js
  34. cat pandora/game_objects/2d_objects/Area2D.js >> build.js
  35. # Package UI Objects
  36. cat pandora/game_objects/ui_objects/UIObject.js >> build.js
  37. cat pandora/game_objects/ui_objects/Button.js >> build.js
  38. cat pandora/game_objects/ui_objects/CheckBox.js >> build.js
  39. cat pandora/game_objects/ui_objects/ColorPicker.js >> build.js
  40. cat pandora/game_objects/ui_objects/Input.js >> build.js
  41. cat pandora/game_objects/ui_objects/Label.js >> build.js
  42. cat pandora/game_objects/ui_objects/Radio.js >> build.js
  43. cat pandora/game_objects/ui_objects/Select.js >> build.js
  44. cat pandora/game_objects/ui_objects/Slider.js >> build.js
  45. # Uglify and remove temporary build file
  46. uglifyjs build.js --output pandora.min.js --compress --mangle
  47. rm build.js