javascriptmvc 3.0.0.pre15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (550) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/README.markdown +15 -0
  4. data/Rakefile +17 -0
  5. data/VERSION +1 -0
  6. data/bin/jmvc-build +4 -0
  7. data/bin/jmvc-gen +4 -0
  8. data/bin/jmvc-get +4 -0
  9. data/bin/jmvc-init +4 -0
  10. data/bin/jmvc-update +4 -0
  11. data/lib/javascriptmvc.rb +97 -0
  12. data/lib/javascriptmvc/documentjs/README +0 -0
  13. data/lib/javascriptmvc/documentjs/add.js +76 -0
  14. data/lib/javascriptmvc/documentjs/application.js +285 -0
  15. data/lib/javascriptmvc/documentjs/attribute.js +61 -0
  16. data/lib/javascriptmvc/documentjs/baseclass.js +537 -0
  17. data/lib/javascriptmvc/documentjs/class.js +141 -0
  18. data/lib/javascriptmvc/documentjs/constructor.js +145 -0
  19. data/lib/javascriptmvc/documentjs/directives.js +394 -0
  20. data/lib/javascriptmvc/documentjs/distance.js +49 -0
  21. data/lib/javascriptmvc/documentjs/document +21 -0
  22. data/lib/javascriptmvc/documentjs/documentjs.js +76 -0
  23. data/lib/javascriptmvc/documentjs/file.js +55 -0
  24. data/lib/javascriptmvc/documentjs/function.js +112 -0
  25. data/lib/javascriptmvc/documentjs/jmvcdoc/images/close.png +0 -0
  26. data/lib/javascriptmvc/documentjs/jmvcdoc/images/download.png +0 -0
  27. data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-off.png +0 -0
  28. data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-on.png +0 -0
  29. data/lib/javascriptmvc/documentjs/jmvcdoc/images/favicon.ico +0 -0
  30. data/lib/javascriptmvc/documentjs/jmvcdoc/images/logo.png +0 -0
  31. data/lib/javascriptmvc/documentjs/jmvcdoc/images/pre.png +0 -0
  32. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  33. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  34. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  35. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  36. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  37. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  38. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  39. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  40. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_222222_256x240.png +0 -0
  41. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_2e83ff_256x240.png +0 -0
  42. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_454545_256x240.png +0 -0
  43. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_888888_256x240.png +0 -0
  44. data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_cd0a0a_256x240.png +0 -0
  45. data/lib/javascriptmvc/documentjs/jmvcdoc/images/video.png +0 -0
  46. data/lib/javascriptmvc/documentjs/jmvcdoc/production.js +552 -0
  47. data/lib/javascriptmvc/documentjs/jmvcdoc/style.css +354 -0
  48. data/lib/javascriptmvc/documentjs/jmvcdoc/summary.ejs +134 -0
  49. data/lib/javascriptmvc/documentjs/json.js +172 -0
  50. data/lib/javascriptmvc/documentjs/page.js +107 -0
  51. data/lib/javascriptmvc/documentjs/pair.js +302 -0
  52. data/lib/javascriptmvc/documentjs/prototype.js +13 -0
  53. data/lib/javascriptmvc/documentjs/scripts/build.js +6 -0
  54. data/lib/javascriptmvc/documentjs/static.js +25 -0
  55. data/lib/javascriptmvc/documentjs/test/docs/Something.json +1 -0
  56. data/lib/javascriptmvc/documentjs/test/docs/searchData.json +1 -0
  57. data/lib/javascriptmvc/documentjs/test/something.js +8 -0
  58. data/lib/javascriptmvc/documentjs/test/test.html +6 -0
  59. data/lib/javascriptmvc/documentjs/test_doc.html +1 -0
  60. data/lib/javascriptmvc/documentjs/update +5 -0
  61. data/lib/javascriptmvc/funcunit/README +17 -0
  62. data/lib/javascriptmvc/funcunit/autosuggest/auto_suggest.js +495 -0
  63. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.css +24 -0
  64. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.html +26 -0
  65. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.js +17 -0
  66. data/lib/javascriptmvc/funcunit/autosuggest/autosuggest_test.js +14 -0
  67. data/lib/javascriptmvc/funcunit/autosuggest/funcunit.html +15 -0
  68. data/lib/javascriptmvc/funcunit/build.js +54 -0
  69. data/lib/javascriptmvc/funcunit/drivers/selenium.js +129 -0
  70. data/lib/javascriptmvc/funcunit/drivers/standard.js +169 -0
  71. data/lib/javascriptmvc/funcunit/envjs +13 -0
  72. data/lib/javascriptmvc/funcunit/envjs.bat +28 -0
  73. data/lib/javascriptmvc/funcunit/funcunit.html +20 -0
  74. data/lib/javascriptmvc/funcunit/funcunit.js +1509 -0
  75. data/lib/javascriptmvc/funcunit/java/selenium-java-client-driver.jar +0 -0
  76. data/lib/javascriptmvc/funcunit/java/selenium-server.jar +0 -0
  77. data/lib/javascriptmvc/funcunit/qunit.html +22 -0
  78. data/lib/javascriptmvc/funcunit/qunit/qunit.css +119 -0
  79. data/lib/javascriptmvc/funcunit/qunit/qunit.js +1124 -0
  80. data/lib/javascriptmvc/funcunit/qunit/rhino/rhino.js +24 -0
  81. data/lib/javascriptmvc/funcunit/qunit/test/qunit.html +18 -0
  82. data/lib/javascriptmvc/funcunit/qunit/test/test.js +7 -0
  83. data/lib/javascriptmvc/funcunit/resources/funcunit.js +31 -0
  84. data/lib/javascriptmvc/funcunit/resources/jquery.js +6378 -0
  85. data/lib/javascriptmvc/funcunit/resources/json.js +201 -0
  86. data/lib/javascriptmvc/funcunit/resources/selenium_start.js +43 -0
  87. data/lib/javascriptmvc/funcunit/scripts/run.js +36 -0
  88. data/lib/javascriptmvc/funcunit/scripts/test.js +55 -0
  89. data/lib/javascriptmvc/funcunit/settings.js +10 -0
  90. data/lib/javascriptmvc/funcunit/synthetic/browsers.js +151 -0
  91. data/lib/javascriptmvc/funcunit/synthetic/demo.html +150 -0
  92. data/lib/javascriptmvc/funcunit/synthetic/demo/record.js +254 -0
  93. data/lib/javascriptmvc/funcunit/synthetic/drag/drag.html +41 -0
  94. data/lib/javascriptmvc/funcunit/synthetic/drag/drag.js +268 -0
  95. data/lib/javascriptmvc/funcunit/synthetic/drag/qunit.html +20 -0
  96. data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/drag_test.js +195 -0
  97. data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/qunit.js +7 -0
  98. data/lib/javascriptmvc/funcunit/synthetic/key.js +832 -0
  99. data/lib/javascriptmvc/funcunit/synthetic/mouse.js +291 -0
  100. data/lib/javascriptmvc/funcunit/synthetic/qunit.html +22 -0
  101. data/lib/javascriptmvc/funcunit/synthetic/recorder.html +303 -0
  102. data/lib/javascriptmvc/funcunit/synthetic/synthetic.html +85 -0
  103. data/lib/javascriptmvc/funcunit/synthetic/synthetic.js +796 -0
  104. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/key_test.js +391 -0
  105. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/mouse_test.js +233 -0
  106. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/qunit.js +6 -0
  107. data/lib/javascriptmvc/funcunit/synthetic/test/qunit/synthetic_test.js +91 -0
  108. data/lib/javascriptmvc/funcunit/synthetic/test/submit.html +29 -0
  109. data/lib/javascriptmvc/funcunit/synthetic/test/submitted.html +3 -0
  110. data/lib/javascriptmvc/funcunit/template.html +18 -0
  111. data/lib/javascriptmvc/funcunit/test/drag.html +63 -0
  112. data/lib/javascriptmvc/funcunit/test/funcunit/funcunit.js +3 -0
  113. data/lib/javascriptmvc/funcunit/test/funcunit/funcunit_test.js +87 -0
  114. data/lib/javascriptmvc/funcunit/test/funcunit/open_test.js +28 -0
  115. data/lib/javascriptmvc/funcunit/test/funcunit/protodrag_test.js +13 -0
  116. data/lib/javascriptmvc/funcunit/test/funcunit/syn_test.js +41 -0
  117. data/lib/javascriptmvc/funcunit/test/jquery.event.drag.js +801 -0
  118. data/lib/javascriptmvc/funcunit/test/jquery.event.drop.js +439 -0
  119. data/lib/javascriptmvc/funcunit/test/jquery.js +6360 -0
  120. data/lib/javascriptmvc/funcunit/test/myapp.html +103 -0
  121. data/lib/javascriptmvc/funcunit/test/myotherapp.html +15 -0
  122. data/lib/javascriptmvc/funcunit/test/protodrag/dragdrop.js +974 -0
  123. data/lib/javascriptmvc/funcunit/test/protodrag/effects.js +1123 -0
  124. data/lib/javascriptmvc/funcunit/test/protodrag/funcunit_test.js +20 -0
  125. data/lib/javascriptmvc/funcunit/test/protodrag/myapp.html +63 -0
  126. data/lib/javascriptmvc/funcunit/test/protodrag/prototype.js +4874 -0
  127. data/lib/javascriptmvc/funcunit/test/protodrag/scriptaculous.js +68 -0
  128. data/lib/javascriptmvc/funcunit/update +5 -0
  129. data/lib/javascriptmvc/jquery/README +24 -0
  130. data/lib/javascriptmvc/jquery/build.js +73 -0
  131. data/lib/javascriptmvc/jquery/class/class.html +109 -0
  132. data/lib/javascriptmvc/jquery/class/class.js +627 -0
  133. data/lib/javascriptmvc/jquery/class/qunit.html +15 -0
  134. data/lib/javascriptmvc/jquery/class/test/qunit/class_test.js +146 -0
  135. data/lib/javascriptmvc/jquery/class/test/qunit/qunit.js +5 -0
  136. data/lib/javascriptmvc/jquery/class/test/qunit/test.html +20 -0
  137. data/lib/javascriptmvc/jquery/controller/controller.html +89 -0
  138. data/lib/javascriptmvc/jquery/controller/controller.js +735 -0
  139. data/lib/javascriptmvc/jquery/controller/history/history.html +44 -0
  140. data/lib/javascriptmvc/jquery/controller/history/history.js +177 -0
  141. data/lib/javascriptmvc/jquery/controller/qunit.html +21 -0
  142. data/lib/javascriptmvc/jquery/controller/subscribe/funcunit.html +21 -0
  143. data/lib/javascriptmvc/jquery/controller/subscribe/scripts/compress.js +6 -0
  144. data/lib/javascriptmvc/jquery/controller/subscribe/scripts/docs.js +6 -0
  145. data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.html +56 -0
  146. data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.js +27 -0
  147. data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/funcunit.js +3 -0
  148. data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/run.js +10 -0
  149. data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/subscribe_test.js +11 -0
  150. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.html +21 -0
  151. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.js +9 -0
  152. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/run.js +2 -0
  153. data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/subscribe_test.js +4 -0
  154. data/lib/javascriptmvc/jquery/controller/test/qunit/controller_test.js +170 -0
  155. data/lib/javascriptmvc/jquery/controller/test/qunit/qunit.js +9 -0
  156. data/lib/javascriptmvc/jquery/controller/view/qunit.html +21 -0
  157. data/lib/javascriptmvc/jquery/controller/view/test/qunit/controller_view_test.js +15 -0
  158. data/lib/javascriptmvc/jquery/controller/view/test/qunit/qunit.js +6 -0
  159. data/lib/javascriptmvc/jquery/controller/view/test/qunit/views/init.micro +1 -0
  160. data/lib/javascriptmvc/jquery/controller/view/view.js +102 -0
  161. data/lib/javascriptmvc/jquery/dom/closest/closest.html +23 -0
  162. data/lib/javascriptmvc/jquery/dom/closest/closest.js +47 -0
  163. data/lib/javascriptmvc/jquery/dom/closest/funcunit.html +20 -0
  164. data/lib/javascriptmvc/jquery/dom/closest/qunit.html +22 -0
  165. data/lib/javascriptmvc/jquery/dom/closest/scripts/compress.js +3 -0
  166. data/lib/javascriptmvc/jquery/dom/closest/scripts/doc.js +4 -0
  167. data/lib/javascriptmvc/jquery/dom/closest/scripts/test.js +55 -0
  168. data/lib/javascriptmvc/jquery/dom/closest/settings.js +40 -0
  169. data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/funcunit.js +3 -0
  170. data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/tests/basic.js +11 -0
  171. data/lib/javascriptmvc/jquery/dom/closest/test/qunit/qunit.js +4 -0
  172. data/lib/javascriptmvc/jquery/dom/closest/test/qunit/tests/basic.js +4 -0
  173. data/lib/javascriptmvc/jquery/dom/compare/compare.html +88 -0
  174. data/lib/javascriptmvc/jquery/dom/compare/compare.js +67 -0
  175. data/lib/javascriptmvc/jquery/dom/compare/qunit.html +20 -0
  176. data/lib/javascriptmvc/jquery/dom/compare/test/qunit/compare_test.js +19 -0
  177. data/lib/javascriptmvc/jquery/dom/compare/test/qunit/qunit.js +5 -0
  178. data/lib/javascriptmvc/jquery/dom/cookie/cookie.html +25 -0
  179. data/lib/javascriptmvc/jquery/dom/cookie/cookie.js +119 -0
  180. data/lib/javascriptmvc/jquery/dom/cookie/scripts/compress.js +6 -0
  181. data/lib/javascriptmvc/jquery/dom/cookie/scripts/doc.js +6 -0
  182. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/cookie_test.js +11 -0
  183. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.html +21 -0
  184. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.js +3 -0
  185. data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/run.js +10 -0
  186. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/cookie_test.js +4 -0
  187. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.html +21 -0
  188. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.js +9 -0
  189. data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/run.js +2 -0
  190. data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.html +71 -0
  191. data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.js +120 -0
  192. data/lib/javascriptmvc/jquery/dom/cur_styles/qunit.html +22 -0
  193. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/curStyles.micro +3 -0
  194. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/cur_styles_test.js +22 -0
  195. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/outer.micro +0 -0
  196. data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/qunit.js +4 -0
  197. data/lib/javascriptmvc/jquery/dom/dimensions/curstyles.html +22 -0
  198. data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.html +132 -0
  199. data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.js +140 -0
  200. data/lib/javascriptmvc/jquery/dom/dimensions/qunit.html +22 -0
  201. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/curStyles.micro +3 -0
  202. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/dimensions_test.js +8 -0
  203. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/outer.micro +0 -0
  204. data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/qunit.js +4 -0
  205. data/lib/javascriptmvc/jquery/dom/dom.js +7 -0
  206. data/lib/javascriptmvc/jquery/dom/fixture/fixture.html +143 -0
  207. data/lib/javascriptmvc/jquery/dom/fixture/fixture.js +521 -0
  208. data/lib/javascriptmvc/jquery/dom/fixture/fixtures/messages.html +31 -0
  209. data/lib/javascriptmvc/jquery/dom/fixture/fixtures/test.json +3 -0
  210. data/lib/javascriptmvc/jquery/dom/fixture/qunit.html +22 -0
  211. data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/fixture_test.js +50 -0
  212. data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/qunit.js +4 -0
  213. data/lib/javascriptmvc/jquery/dom/form_params/form_params.html +57 -0
  214. data/lib/javascriptmvc/jquery/dom/form_params/form_params.js +106 -0
  215. data/lib/javascriptmvc/jquery/dom/form_params/qunit.html +22 -0
  216. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/basics.micro +27 -0
  217. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/checkbox.micro +20 -0
  218. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/form_params_test.js +43 -0
  219. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/qunit.js +4 -0
  220. data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/truthy.micro +8 -0
  221. data/lib/javascriptmvc/jquery/dom/within/within.js +67 -0
  222. data/lib/javascriptmvc/jquery/error/background.png +0 -0
  223. data/lib/javascriptmvc/jquery/error/error.html +31 -0
  224. data/lib/javascriptmvc/jquery/error/error.js +227 -0
  225. data/lib/javascriptmvc/jquery/error/setup.js +4 -0
  226. data/lib/javascriptmvc/jquery/error/test/test.html +23 -0
  227. data/lib/javascriptmvc/jquery/error/test/test.js +4 -0
  228. data/lib/javascriptmvc/jquery/event/default/compress.js +7 -0
  229. data/lib/javascriptmvc/jquery/event/default/default.html +85 -0
  230. data/lib/javascriptmvc/jquery/event/default/default.js +193 -0
  231. data/lib/javascriptmvc/jquery/event/default/defaultjquery.html +117 -0
  232. data/lib/javascriptmvc/jquery/event/default/qunit.html +22 -0
  233. data/lib/javascriptmvc/jquery/event/default/test/qunit/default_test.js +104 -0
  234. data/lib/javascriptmvc/jquery/event/default/test/qunit/html.micro +8 -0
  235. data/lib/javascriptmvc/jquery/event/default/test/qunit/qunit.js +6 -0
  236. data/lib/javascriptmvc/jquery/event/default/test/qunit/run.js +2 -0
  237. data/lib/javascriptmvc/jquery/event/destroyed/destroyed.html +24 -0
  238. data/lib/javascriptmvc/jquery/event/destroyed/destroyed.js +40 -0
  239. data/lib/javascriptmvc/jquery/event/destroyed/destroyed_menu.html +96 -0
  240. data/lib/javascriptmvc/jquery/event/destroyed/qunit.html +21 -0
  241. data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/destroyed_test.js +12 -0
  242. data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/qunit.js +6 -0
  243. data/lib/javascriptmvc/jquery/event/drag/drag.html +105 -0
  244. data/lib/javascriptmvc/jquery/event/drag/drag.js +466 -0
  245. data/lib/javascriptmvc/jquery/event/drag/limit/limit.html +74 -0
  246. data/lib/javascriptmvc/jquery/event/drag/limit/limit.js +56 -0
  247. data/lib/javascriptmvc/jquery/event/drag/limit/scripts/compress.js +6 -0
  248. data/lib/javascriptmvc/jquery/event/drag/limit/scripts/doc.js +6 -0
  249. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.html +21 -0
  250. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.js +3 -0
  251. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/limit_test.js +11 -0
  252. data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/run.js +10 -0
  253. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/limit_test.js +4 -0
  254. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.html +21 -0
  255. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.js +9 -0
  256. data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/run.js +2 -0
  257. data/lib/javascriptmvc/jquery/event/drag/qunit.html +16 -0
  258. data/lib/javascriptmvc/jquery/event/drag/scroll/scroll.js +120 -0
  259. data/lib/javascriptmvc/jquery/event/drag/test/qunit/drag_test.js +130 -0
  260. data/lib/javascriptmvc/jquery/event/drag/test/qunit/qunit.js +4 -0
  261. data/lib/javascriptmvc/jquery/event/drop/drop.html +74 -0
  262. data/lib/javascriptmvc/jquery/event/drop/drop.js +301 -0
  263. data/lib/javascriptmvc/jquery/event/event.js +6 -0
  264. data/lib/javascriptmvc/jquery/event/hashchange/hashchange.js +245 -0
  265. data/lib/javascriptmvc/jquery/event/hover/compress.js +7 -0
  266. data/lib/javascriptmvc/jquery/event/hover/hover.html +56 -0
  267. data/lib/javascriptmvc/jquery/event/hover/hover.js +219 -0
  268. data/lib/javascriptmvc/jquery/event/hover/qunit.html +16 -0
  269. data/lib/javascriptmvc/jquery/event/hover/test/qunit/hover_test.js +55 -0
  270. data/lib/javascriptmvc/jquery/event/hover/test/qunit/qunit.js +4 -0
  271. data/lib/javascriptmvc/jquery/event/livehack/compress.js +7 -0
  272. data/lib/javascriptmvc/jquery/event/livehack/funcunit.html +21 -0
  273. data/lib/javascriptmvc/jquery/event/livehack/livehack.html +25 -0
  274. data/lib/javascriptmvc/jquery/event/livehack/livehack.js +167 -0
  275. data/lib/javascriptmvc/jquery/event/offline/funcunit.html +20 -0
  276. data/lib/javascriptmvc/jquery/event/offline/offline.html +26 -0
  277. data/lib/javascriptmvc/jquery/event/offline/offline.js +36 -0
  278. data/lib/javascriptmvc/jquery/event/offline/qunit.html +22 -0
  279. data/lib/javascriptmvc/jquery/event/offline/scripts/compress.js +3 -0
  280. data/lib/javascriptmvc/jquery/event/offline/scripts/doc.js +4 -0
  281. data/lib/javascriptmvc/jquery/event/offline/settings.js +41 -0
  282. data/lib/javascriptmvc/jquery/event/offline/test/funcunit/funcunit.js +3 -0
  283. data/lib/javascriptmvc/jquery/event/offline/test/funcunit/tests/basic.js +11 -0
  284. data/lib/javascriptmvc/jquery/event/offline/test/qunit/qunit.js +4 -0
  285. data/lib/javascriptmvc/jquery/event/offline/test/qunit/tests/basic.js +4 -0
  286. data/lib/javascriptmvc/jquery/event/resize/funcunit.html +20 -0
  287. data/lib/javascriptmvc/jquery/event/resize/qunit.html +22 -0
  288. data/lib/javascriptmvc/jquery/event/resize/resize.html +23 -0
  289. data/lib/javascriptmvc/jquery/event/resize/resize.js +50 -0
  290. data/lib/javascriptmvc/jquery/event/resize/scripts/compress.js +3 -0
  291. data/lib/javascriptmvc/jquery/event/resize/scripts/doc.js +4 -0
  292. data/lib/javascriptmvc/jquery/event/resize/scripts/test.js +55 -0
  293. data/lib/javascriptmvc/jquery/event/resize/settings.js +40 -0
  294. data/lib/javascriptmvc/jquery/event/resize/test/funcunit/funcunit.js +3 -0
  295. data/lib/javascriptmvc/jquery/event/resize/test/funcunit/tests/basic.js +11 -0
  296. data/lib/javascriptmvc/jquery/event/resize/test/qunit/qunit.js +4 -0
  297. data/lib/javascriptmvc/jquery/event/resize/test/qunit/tests/basic.js +4 -0
  298. data/lib/javascriptmvc/jquery/event/select/scripts/compress.js +6 -0
  299. data/lib/javascriptmvc/jquery/event/select/scripts/doc.js +6 -0
  300. data/lib/javascriptmvc/jquery/event/select/select.html +63 -0
  301. data/lib/javascriptmvc/jquery/event/select/select.js +65 -0
  302. data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.html +21 -0
  303. data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.js +3 -0
  304. data/lib/javascriptmvc/jquery/event/select/test/funcunit/run.js +10 -0
  305. data/lib/javascriptmvc/jquery/event/select/test/funcunit/select_test.js +11 -0
  306. data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.html +21 -0
  307. data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.js +5 -0
  308. data/lib/javascriptmvc/jquery/event/select/test/qunit/run.js +2 -0
  309. data/lib/javascriptmvc/jquery/event/select/test/qunit/select_test.js +4 -0
  310. data/lib/javascriptmvc/jquery/generate/app +23 -0
  311. data/lib/javascriptmvc/jquery/generate/controller +21 -0
  312. data/lib/javascriptmvc/jquery/generate/model +26 -0
  313. data/lib/javascriptmvc/jquery/generate/page +20 -0
  314. data/lib/javascriptmvc/jquery/generate/plugin +20 -0
  315. data/lib/javascriptmvc/jquery/generate/scaffold +23 -0
  316. data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).css.ejs +4 -0
  317. data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).html.ejs +23 -0
  318. data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).js.ejs +21 -0
  319. data/lib/javascriptmvc/jquery/generate/templates/app/controllers/.ignore +0 -0
  320. data/lib/javascriptmvc/jquery/generate/templates/app/docs/.ignore +0 -0
  321. data/lib/javascriptmvc/jquery/generate/templates/app/fixtures/.ignore +0 -0
  322. data/lib/javascriptmvc/jquery/generate/templates/app/funcunit.html.ejs +15 -0
  323. data/lib/javascriptmvc/jquery/generate/templates/app/models/.ignore +0 -0
  324. data/lib/javascriptmvc/jquery/generate/templates/app/qunit.html.ejs +20 -0
  325. data/lib/javascriptmvc/jquery/generate/templates/app/resources/.ignore +0 -0
  326. data/lib/javascriptmvc/jquery/generate/templates/app/scripts/build.js.ejs +6 -0
  327. data/lib/javascriptmvc/jquery/generate/templates/app/scripts/clean.js.ejs +6 -0
  328. data/lib/javascriptmvc/jquery/generate/templates/app/scripts/docs.js.ejs +4 -0
  329. data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/(application_name)_test.js.ejs +9 -0
  330. data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/funcunit.js.ejs +3 -0
  331. data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/(application_name)_test.js.ejs +5 -0
  332. data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/qunit.js.ejs +3 -0
  333. data/lib/javascriptmvc/jquery/generate/templates/app/views/.ignore +0 -0
  334. data/lib/javascriptmvc/jquery/generate/templates/controller/controllers/(underscore)_controller.js.ejs +12 -0
  335. data/lib/javascriptmvc/jquery/generate/templates/model/fixtures.link +1 -0
  336. data/lib/javascriptmvc/jquery/generate/templates/model/models.link +1 -0
  337. data/lib/javascriptmvc/jquery/generate/templates/model/test/qunit.link +1 -0
  338. data/lib/javascriptmvc/jquery/generate/templates/page.ejs +23 -0
  339. data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).html.ejs +23 -0
  340. data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).js.ejs +3 -0
  341. data/lib/javascriptmvc/jquery/generate/templates/plugin/fixtures/.ignore +0 -0
  342. data/lib/javascriptmvc/jquery/generate/templates/plugin/funcunit.html.ejs +15 -0
  343. data/lib/javascriptmvc/jquery/generate/templates/plugin/qunit.html.ejs +20 -0
  344. data/lib/javascriptmvc/jquery/generate/templates/plugin/resources/.ignore +0 -0
  345. data/lib/javascriptmvc/jquery/generate/templates/plugin/scripts.link +1 -0
  346. data/lib/javascriptmvc/jquery/generate/templates/plugin/test.link +1 -0
  347. data/lib/javascriptmvc/jquery/generate/templates/plugin/views/.ignore +0 -0
  348. data/lib/javascriptmvc/jquery/generate/templates/scaffold/controllers/(underscore)_controller.js.ejs +96 -0
  349. data/lib/javascriptmvc/jquery/generate/templates/scaffold/fixtures/(plural).json.get.ejs +3 -0
  350. data/lib/javascriptmvc/jquery/generate/templates/scaffold/models/(underscore).js.ejs +83 -0
  351. data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/funcunit/(underscore)_controller_test.js.ejs +63 -0
  352. data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/qunit/(underscore)_test.js.ejs +45 -0
  353. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/edit.ejs.ejs +10 -0
  354. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/init.ejs.ejs +26 -0
  355. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/list.ejs.ejs +5 -0
  356. data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/show.ejs.ejs +10 -0
  357. data/lib/javascriptmvc/jquery/jquery.js +6360 -0
  358. data/lib/javascriptmvc/jquery/lang/json/json.html +25 -0
  359. data/lib/javascriptmvc/jquery/lang/json/json.js +201 -0
  360. data/lib/javascriptmvc/jquery/lang/json/scripts/compress.js +6 -0
  361. data/lib/javascriptmvc/jquery/lang/json/scripts/doc.js +6 -0
  362. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.html +21 -0
  363. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.js +3 -0
  364. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/json_test.js +11 -0
  365. data/lib/javascriptmvc/jquery/lang/json/test/funcunit/run.js +10 -0
  366. data/lib/javascriptmvc/jquery/lang/json/test/qunit/json_test.js +4 -0
  367. data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.html +21 -0
  368. data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.js +9 -0
  369. data/lib/javascriptmvc/jquery/lang/json/test/qunit/run.js +2 -0
  370. data/lib/javascriptmvc/jquery/lang/lang.html +27 -0
  371. data/lib/javascriptmvc/jquery/lang/lang.js +104 -0
  372. data/lib/javascriptmvc/jquery/lang/openajax/openajax.js +202 -0
  373. data/lib/javascriptmvc/jquery/lang/rsplit/rsplit.js +31 -0
  374. data/lib/javascriptmvc/jquery/lang/vector/vector.js +167 -0
  375. data/lib/javascriptmvc/jquery/model/associations/associations.html +25 -0
  376. data/lib/javascriptmvc/jquery/model/associations/associations.js +46 -0
  377. data/lib/javascriptmvc/jquery/model/associations/qunit.html +21 -0
  378. data/lib/javascriptmvc/jquery/model/associations/test/qunit/associations_test.js +51 -0
  379. data/lib/javascriptmvc/jquery/model/associations/test/qunit/qunit.js +9 -0
  380. data/lib/javascriptmvc/jquery/model/associations/test/qunit/run.js +2 -0
  381. data/lib/javascriptmvc/jquery/model/backup/backup.js +82 -0
  382. data/lib/javascriptmvc/jquery/model/json_rest/json_rest.js +91 -0
  383. data/lib/javascriptmvc/jquery/model/list/list.js +148 -0
  384. data/lib/javascriptmvc/jquery/model/list/qunit.html +16 -0
  385. data/lib/javascriptmvc/jquery/model/list/test/qunit/list_test.js +58 -0
  386. data/lib/javascriptmvc/jquery/model/list/test/qunit/qunit.js +6 -0
  387. data/lib/javascriptmvc/jquery/model/list/test/qunit/run.js +0 -0
  388. data/lib/javascriptmvc/jquery/model/model.js +537 -0
  389. data/lib/javascriptmvc/jquery/model/qunit.html +17 -0
  390. data/lib/javascriptmvc/jquery/model/store/store.js +66 -0
  391. data/lib/javascriptmvc/jquery/model/test/qunit/model_test.js +71 -0
  392. data/lib/javascriptmvc/jquery/model/test/qunit/qunit.js +5 -0
  393. data/lib/javascriptmvc/jquery/qunit.html +15 -0
  394. data/lib/javascriptmvc/jquery/test/funcunit/funcunit.html +21 -0
  395. data/lib/javascriptmvc/jquery/test/funcunit/funcunit.js +3 -0
  396. data/lib/javascriptmvc/jquery/test/funcunit/jquerytest_test.js +11 -0
  397. data/lib/javascriptmvc/jquery/test/funcunit/run.js +10 -0
  398. data/lib/javascriptmvc/jquery/test/qunit/qunit.js +22 -0
  399. data/lib/javascriptmvc/jquery/update +5 -0
  400. data/lib/javascriptmvc/jquery/view/compress.js +7 -0
  401. data/lib/javascriptmvc/jquery/view/ejs/ejs.html +25 -0
  402. data/lib/javascriptmvc/jquery/view/ejs/ejs.js +489 -0
  403. data/lib/javascriptmvc/jquery/view/ejs/funcunit.html +21 -0
  404. data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/ejs_test.js +11 -0
  405. data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/funcunit.js +3 -0
  406. data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/run.js +10 -0
  407. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/ejs_test.js +4 -0
  408. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.html +21 -0
  409. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.js +9 -0
  410. data/lib/javascriptmvc/jquery/view/ejs/test/qunit/run.js +2 -0
  411. data/lib/javascriptmvc/jquery/view/fulljslint.js +3774 -0
  412. data/lib/javascriptmvc/jquery/view/helpers/helpers.js +338 -0
  413. data/lib/javascriptmvc/jquery/view/jaml/compress.js +7 -0
  414. data/lib/javascriptmvc/jquery/view/jaml/funcunit.html +21 -0
  415. data/lib/javascriptmvc/jquery/view/jaml/jaml.html +25 -0
  416. data/lib/javascriptmvc/jquery/view/jaml/jaml.js +73 -0
  417. data/lib/javascriptmvc/jquery/view/jaml/node.js +149 -0
  418. data/lib/javascriptmvc/jquery/view/jaml/template.js +131 -0
  419. data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/funcunit.js +3 -0
  420. data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/jaml_test.js +11 -0
  421. data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/run.js +10 -0
  422. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/jaml_test.js +4 -0
  423. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.html +21 -0
  424. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.js +9 -0
  425. data/lib/javascriptmvc/jquery/view/jaml/test/qunit/run.js +2 -0
  426. data/lib/javascriptmvc/jquery/view/micro/compress.js +7 -0
  427. data/lib/javascriptmvc/jquery/view/micro/funcunit.html +21 -0
  428. data/lib/javascriptmvc/jquery/view/micro/micro.html +25 -0
  429. data/lib/javascriptmvc/jquery/view/micro/micro.js +57 -0
  430. data/lib/javascriptmvc/jquery/view/micro/test/funcunit/funcunit.js +3 -0
  431. data/lib/javascriptmvc/jquery/view/micro/test/funcunit/micro_test.js +11 -0
  432. data/lib/javascriptmvc/jquery/view/micro/test/funcunit/run.js +10 -0
  433. data/lib/javascriptmvc/jquery/view/micro/test/qunit/micro_test.js +4 -0
  434. data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.html +21 -0
  435. data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.js +9 -0
  436. data/lib/javascriptmvc/jquery/view/micro/test/qunit/run.js +2 -0
  437. data/lib/javascriptmvc/jquery/view/qunit.html +16 -0
  438. data/lib/javascriptmvc/jquery/view/test/compression/compression.html +12 -0
  439. data/lib/javascriptmvc/jquery/view/test/compression/compression.js +11 -0
  440. data/lib/javascriptmvc/jquery/view/test/compression/run.js +36 -0
  441. data/lib/javascriptmvc/jquery/view/test/funcunit/funcunit.js +3 -0
  442. data/lib/javascriptmvc/jquery/view/test/funcunit/run.js +10 -0
  443. data/lib/javascriptmvc/jquery/view/test/funcunit/view_test.js +11 -0
  444. data/lib/javascriptmvc/jquery/view/test/qunit/nested_plugin.ejs +1 -0
  445. data/lib/javascriptmvc/jquery/view/test/qunit/plugin.ejs +1 -0
  446. data/lib/javascriptmvc/jquery/view/test/qunit/qunit.js +9 -0
  447. data/lib/javascriptmvc/jquery/view/test/qunit/template.ejs +1 -0
  448. data/lib/javascriptmvc/jquery/view/test/qunit/template.jaml +3 -0
  449. data/lib/javascriptmvc/jquery/view/test/qunit/template.micro +1 -0
  450. data/lib/javascriptmvc/jquery/view/test/qunit/template.tmpl +1 -0
  451. data/lib/javascriptmvc/jquery/view/test/qunit/view_test.js +24 -0
  452. data/lib/javascriptmvc/jquery/view/tmpl/tmpl.js +150 -0
  453. data/lib/javascriptmvc/jquery/view/view.html +65 -0
  454. data/lib/javascriptmvc/jquery/view/view.js +296 -0
  455. data/lib/javascriptmvc/js +56 -0
  456. data/lib/javascriptmvc/js.bat +57 -0
  457. data/lib/javascriptmvc/steal/README +26 -0
  458. data/lib/javascriptmvc/steal/build/apps/apps.js +208 -0
  459. data/lib/javascriptmvc/steal/build/apps/test.js +4 -0
  460. data/lib/javascriptmvc/steal/build/build.js +281 -0
  461. data/lib/javascriptmvc/steal/build/pluginify.js +73 -0
  462. data/lib/javascriptmvc/steal/build/scripts/compiler.jar +0 -0
  463. data/lib/javascriptmvc/steal/build/scripts/scripts.js +155 -0
  464. data/lib/javascriptmvc/steal/build/styles/cssmin.js +17 -0
  465. data/lib/javascriptmvc/steal/build/styles/styles.js +84 -0
  466. data/lib/javascriptmvc/steal/build/test/basicpage.html +6 -0
  467. data/lib/javascriptmvc/steal/build/test/basicproduction.js +1 -0
  468. data/lib/javascriptmvc/steal/build/test/basicsource.js +6 -0
  469. data/lib/javascriptmvc/steal/build/test/css/css/css1.css +1 -0
  470. data/lib/javascriptmvc/steal/build/test/css/css/justin.png +0 -0
  471. data/lib/javascriptmvc/steal/build/test/css/css2.css +5 -0
  472. data/lib/javascriptmvc/steal/build/test/css/page.html +9 -0
  473. data/lib/javascriptmvc/steal/build/test/css/production.css +1 -0
  474. data/lib/javascriptmvc/steal/build/test/css/test.js +7 -0
  475. data/lib/javascriptmvc/steal/build/test/css/upload.PNG +0 -0
  476. data/lib/javascriptmvc/steal/build/test/foreign.html +6 -0
  477. data/lib/javascriptmvc/steal/build/test/foreign.js +2 -0
  478. data/lib/javascriptmvc/steal/build/test/removecode.js +11 -0
  479. data/lib/javascriptmvc/steal/build/test/run.js +57 -0
  480. data/lib/javascriptmvc/steal/build/test/stealpage.html +10 -0
  481. data/lib/javascriptmvc/steal/build/test/stealprodpage.html +10 -0
  482. data/lib/javascriptmvc/steal/build/test/test.js +3 -0
  483. data/lib/javascriptmvc/steal/buildjs +21 -0
  484. data/lib/javascriptmvc/steal/clean/beautify.js +1108 -0
  485. data/lib/javascriptmvc/steal/clean/clean.js +179 -0
  486. data/lib/javascriptmvc/steal/clean/jslint.js +5662 -0
  487. data/lib/javascriptmvc/steal/clean/test.js +7 -0
  488. data/lib/javascriptmvc/steal/cleanjs +5 -0
  489. data/lib/javascriptmvc/steal/coffee/coffee-script.js +9 -0
  490. data/lib/javascriptmvc/steal/coffee/coffee.js +56 -0
  491. data/lib/javascriptmvc/steal/dev/dev.js +83 -0
  492. data/lib/javascriptmvc/steal/end.js +1 -0
  493. data/lib/javascriptmvc/steal/generate/app +23 -0
  494. data/lib/javascriptmvc/steal/generate/ejs.js +470 -0
  495. data/lib/javascriptmvc/steal/generate/generate.js +211 -0
  496. data/lib/javascriptmvc/steal/generate/inflector.js +117 -0
  497. data/lib/javascriptmvc/steal/generate/system.js +33 -0
  498. data/lib/javascriptmvc/steal/generate/templates/app/(application_name).css.ejs +10 -0
  499. data/lib/javascriptmvc/steal/generate/templates/app/(application_name).html.ejs +18 -0
  500. data/lib/javascriptmvc/steal/generate/templates/app/(application_name).js.ejs +10 -0
  501. data/lib/javascriptmvc/steal/generate/templates/app/docs/.ignore +0 -0
  502. data/lib/javascriptmvc/steal/generate/templates/app/resources/.ignore +0 -0
  503. data/lib/javascriptmvc/steal/generate/templates/app/resources/example.coffee.ejs +5 -0
  504. data/lib/javascriptmvc/steal/generate/templates/app/resources/example.js.ejs +13 -0
  505. data/lib/javascriptmvc/steal/generate/templates/app/resources/example.less.ejs +9 -0
  506. data/lib/javascriptmvc/steal/generate/templates/app/scripts/build.js.ejs +6 -0
  507. data/lib/javascriptmvc/steal/generate/templates/app/scripts/clean.js.ejs +6 -0
  508. data/lib/javascriptmvc/steal/generate/templates/app/test/.ignore +0 -0
  509. data/lib/javascriptmvc/steal/generate/templates/page.ejs +23 -0
  510. data/lib/javascriptmvc/steal/generate/test/test.js +92 -0
  511. data/lib/javascriptmvc/steal/get/get.js +163 -0
  512. data/lib/javascriptmvc/steal/get/gets.json +10 -0
  513. data/lib/javascriptmvc/steal/get/getter.js +115 -0
  514. data/lib/javascriptmvc/steal/get/github.js +134 -0
  515. data/lib/javascriptmvc/steal/get/json.js +172 -0
  516. data/lib/javascriptmvc/steal/getjs +5 -0
  517. data/lib/javascriptmvc/steal/js +56 -0
  518. data/lib/javascriptmvc/steal/js.bat +57 -0
  519. data/lib/javascriptmvc/steal/less/less.js +117 -0
  520. data/lib/javascriptmvc/steal/less/less_engine.js +2529 -0
  521. data/lib/javascriptmvc/steal/rhino/blank.html +6 -0
  522. data/lib/javascriptmvc/steal/rhino/build.js +31 -0
  523. data/lib/javascriptmvc/steal/rhino/docs.js +68 -0
  524. data/lib/javascriptmvc/steal/rhino/empty.html +12 -0
  525. data/lib/javascriptmvc/steal/rhino/env.js +11537 -0
  526. data/lib/javascriptmvc/steal/rhino/file.js +299 -0
  527. data/lib/javascriptmvc/steal/rhino/js.jar +0 -0
  528. data/lib/javascriptmvc/steal/rhino/loader.js +8 -0
  529. data/lib/javascriptmvc/steal/rhino/prompt.js +49 -0
  530. data/lib/javascriptmvc/steal/rhino/steal.js +122 -0
  531. data/lib/javascriptmvc/steal/rhino/test.js +16 -0
  532. data/lib/javascriptmvc/steal/steal.js +1317 -0
  533. data/lib/javascriptmvc/steal/steal.production.js +23 -0
  534. data/lib/javascriptmvc/steal/test/absoluteurl.html +7 -0
  535. data/lib/javascriptmvc/steal/test/absoluteurl/absoluteurl.js +1 -0
  536. data/lib/javascriptmvc/steal/test/absoluteurl/alert.js +1 -0
  537. data/lib/javascriptmvc/steal/test/another/two.js +2 -0
  538. data/lib/javascriptmvc/steal/test/one/four.js +1 -0
  539. data/lib/javascriptmvc/steal/test/one/one.js +6 -0
  540. data/lib/javascriptmvc/steal/test/qunit/qunit.html +22 -0
  541. data/lib/javascriptmvc/steal/test/qunit/qunit.js +3 -0
  542. data/lib/javascriptmvc/steal/test/qunit/steal_test.js +197 -0
  543. data/lib/javascriptmvc/steal/test/run.js +12 -0
  544. data/lib/javascriptmvc/steal/test/steal.html +37 -0
  545. data/lib/javascriptmvc/steal/test/test.js +82 -0
  546. data/lib/javascriptmvc/steal/test/three.js +3 -0
  547. data/lib/javascriptmvc/steal/testing/test.html +20 -0
  548. data/lib/javascriptmvc/steal/testing/testing.js +48 -0
  549. data/lib/javascriptmvc/steal/update +5 -0
  550. metadata +622 -0
@@ -0,0 +1,296 @@
1
+ if ( window.jQuery && jQuery.Controller ) {
2
+ steal.plugins("jquery/controller/view")
3
+ }
4
+ steal.plugins("jquery").then(function( $ ) {
5
+
6
+ // converts to an ok dom id
7
+ var toId = function( src ) {
8
+ return src.replace(/^\/\//, "").replace(/[\/\.]/g, "_")
9
+ },
10
+ // used for hookup ids
11
+ id = 1;
12
+
13
+ /**
14
+ * @constructor jQuery.View
15
+ * @tag core
16
+ * View provides a uniform interface for using templates in JavaScriptMVC. When templates
17
+ * [jQuery.View.static.register register] themselves, you are able to:
18
+ * <ul>
19
+ *
20
+ * <li>Use views with jQuery extensions [jQuery.fn.after after], [jQuery.fn.append append],
21
+ * [jQuery.fn.before before], [jQuery.fn.html html], [jQuery.fn.prepend prepend],
22
+ * [jQuery.fn.replace replace], [jQuery.fn.text text] like:
23
+ * @codestart
24
+ * $('.foo').html("//path/to/view.ejs",{})
25
+ * @codeend
26
+ * </li>
27
+ * <li>Compress your views with [steal.static.views].</li>
28
+ * <li>Use the [jQuery.Controller.prototype.view controller/view] plugin to auto-magically
29
+ * lookup views.</li>
30
+ * <li>Hookup Controllers and other code on elements after render.</li>
31
+ *
32
+ * </ul>
33
+ *
34
+ * <h2>Supported Templates</h2>
35
+ * <ul>
36
+ * <li>[jQuery.View.EJS EJS] - provides an ERB like syntax: <code>&lt;%= %&gt;</code></li>
37
+ * <li>[Jaml] - A functional approach to JS templates.</li>
38
+ * <li>[Micro] - A very lightweight template similar to EJS.</li>
39
+ * </ul>
40
+ * @iframe jquery/view/view.html 700
41
+ *
42
+ *
43
+ * <h2>Compress Views with Steal</h2>
44
+ * Steal can package processed views in the production file. Because 'stolen' views are already
45
+ * processed, they don't rely on eval. Here's how to steal them:
46
+ * @codestart
47
+ * steal.views('//views/tasks/show.ejs');
48
+ * @codeend
49
+ * Read more about [steal.static.views steal.views].
50
+ * <h2>Hooking up controllers</h2>
51
+ * After drawing some html, you often want to add other widgets and plugins inside that html.
52
+ * View makes this easy. You just have to return the Contoller class you want to be hooked up.
53
+ * @codestart
54
+ * &lt;ul &lt;%= Phui.Tabs%>>...&lt;ul>
55
+ * @codeend
56
+ * You can even hook up multiple controllers:
57
+ * @codestart
58
+ * &lt;ul &lt;%= [Phui.Tabs, Phui.Filler]%>>...&lt;ul>
59
+ * @codeend
60
+ * @init Looks up a template, processes it, caches it, then renders the template
61
+ * with data and optional helpers.
62
+ * @codestart
63
+ * $.View("//myplugin/views/init.ejs",{message: "Hello World"})
64
+ * @codeend
65
+ * @param {String} url The url or id of an element to use as the template's source.
66
+ * @param {Object} data The data to be passed to the view.
67
+ * @param {Object} [helpers] Optional helper functions the view might use.
68
+ * @return {String} The rendered result of the view.
69
+ */
70
+ $.View = function( url, data, helpers ) {
71
+ var suffix = url.match(/\.[\w\d]+$/),
72
+ type, el, url, id, renderer;
73
+
74
+ //if there is no suffix, add one
75
+ if (!suffix ) {
76
+ suffix = $.View.ext;
77
+ url = url + $.View.ext
78
+ }
79
+
80
+ //convert to a unique and valid id
81
+ id = toId(url);
82
+
83
+ //if a absolute path, use steal to get it
84
+ if ( url.match(/^\/\//) ) {
85
+ url = steal.root.join(url.substr(2)); //can steal be removed?
86
+ }
87
+
88
+ //get the template engine
89
+ type = $.View.types[suffix];
90
+
91
+ //get the renderer function
92
+ var renderer =
93
+ $.View.cached[id] ? // is it cached?
94
+ $.View.cached[id] : // use the cached version
95
+ ((el = document.getElementById(id)) ? //is it in the document?
96
+ type.renderer(id, el.innerHTML) : //use the innerHTML of the elemnt
97
+ type.get(id, url) //do an ajax request for it
98
+ );
99
+
100
+ //if we should cache templates
101
+ if ( $.View.cache ) {
102
+ $.View.cached[id] = renderer;
103
+ }
104
+ return renderer.call(type, data, helpers)
105
+ };
106
+
107
+ /* @Static */
108
+ $.extend($.View, {
109
+ /**
110
+ * @attribute hookups
111
+ * @hide
112
+ * A list of pending 'hookups'
113
+ */
114
+ hookups: {},
115
+ /**
116
+ * @function hookup
117
+ * Registers a hookup function to be called back after the html is put on the page
118
+ * @param {Function} cb a callback function to be called with the element
119
+ * @param {Number} the hookup number
120
+ */
121
+ hookup: function( cb ) {
122
+ var myid = ++id;
123
+ jQuery.View.hookups[myid] = cb;
124
+ return myid;
125
+ },
126
+ /**
127
+ * @attribute cached
128
+ * @hide
129
+ * Cached are put in this object
130
+ */
131
+ cached: {},
132
+ /**
133
+ * @attribute cache
134
+ * Should the views be cached or reloaded from the server. Defaults to true.
135
+ */
136
+ cache: true,
137
+ /**
138
+ * @function register
139
+ * Registers a template engine to be used with view helpers and compression.
140
+ * @param {Object} info a object of method and properties that enable template integration:
141
+ * <ul>
142
+ * <li>suffix - the view extension. EX: 'ejs'</li>
143
+ * <li>get(id, url) - a function that returns the 'render' function of processed template. <b>get</b>
144
+ * function is called with an id for the template and the url where the view can be loaded.
145
+ * The returned function's signiture should look like:
146
+ * <pre>renderer(data, helpers)</pre>
147
+ * </li>
148
+ * <li>script(id, src) - a function that returns a string that when evaluated returns a function that can be
149
+ * used as the render (i.e. have func.call(data, data, helpers) called on it).</li>
150
+ * <li>renderer(id, text) - a function that takes the id of the template and the text of the template and
151
+ * returns a render function.</li>
152
+ * </ul>
153
+ */
154
+ register: function( info ) {
155
+ this.types["." + info.suffix] = info;
156
+ },
157
+ types: {},
158
+ /**
159
+ * @attribute ext
160
+ * The default suffix to use if none is provided in the view's url.
161
+ * This is set to .ejs by default.
162
+ */
163
+ ext: ".ejs",
164
+ /**
165
+ * @hide
166
+ * @param {Object} type
167
+ * @param {Object} id
168
+ * @param {Object} src
169
+ */
170
+ registerScript: function( type, id, src ) {
171
+ return "$.View.preload('" + id + "'," + $.View.types["." + type].script(id, src) + ");";
172
+ },
173
+ /**
174
+ * @hide
175
+ * Called by a production script to pre-load a renderer function
176
+ * into the view cache.
177
+ * @param {String} id
178
+ * @param {Function} renderer
179
+ */
180
+ preload: function( id, renderer ) {
181
+ $.View.cached[id] = function( data, helpers ) {
182
+ return renderer.call(data, data, helpers)
183
+ }
184
+ }
185
+
186
+ })
187
+
188
+
189
+ //---- ADD jQUERY HELPERS -----
190
+ var
191
+ //converts jquery functions to use views
192
+ convert = function( func_name ) {
193
+ var old = jQuery.fn[func_name];
194
+
195
+ jQuery.fn[func_name] = function() {
196
+ var args = arguments,
197
+ res, hasHookup, secArgType = typeof arguments[1];
198
+
199
+ //check if a template
200
+ if ( typeof arguments[0] == "string" && (secArgType == 'object' || secArgType == 'function') && !arguments[1].nodeType && !arguments[1].jquery ) {
201
+ args = [$.View.apply($.View, $.makeArray(arguments))];
202
+ }
203
+
204
+ //check if there are new hookups
205
+ for ( var hasHookups in jQuery.View.hookups ) {};
206
+
207
+ //if there are hookups, get jQuery object
208
+ if ( hasHookups ) {
209
+ args[0] = $(args[0])
210
+ }
211
+ res = old.apply(this, args)
212
+
213
+ //now hookup hookups
214
+ if ( hasHookups ) {
215
+ hookupView(args[0])
216
+ }
217
+ return res;
218
+ }
219
+ },
220
+ hookupView = function( els ) {
221
+ //remove all hookups
222
+ var hooks = jQuery.View.hookups,
223
+ hookupEls, len, i = 0,
224
+ id, func;
225
+ jQuery.View.hookups = {};
226
+ hookupEls = els.add("[data-view-id]", els);
227
+ len = hookupEls.length;
228
+ for (; i < len; i++ ) {
229
+ if ( hookupEls[i].getAttribute && (id = hookupEls[i].getAttribute('data-view-id')) && (func = hooks[id]) ) {
230
+ func(hookupEls[i], id);
231
+ delete hooks[id];
232
+ hookupEls[i].removeAttribute('data-view-id')
233
+ }
234
+ }
235
+ //copy remaining hooks back
236
+ $.extend(jQuery.View.hookups, hooks);
237
+ },
238
+ /**
239
+ * @add jQuery.fn
240
+ */
241
+ funcs = [
242
+ /**
243
+ * @function prepend
244
+ * @tag view
245
+ * abc
246
+ */
247
+ "prepend",
248
+ /**
249
+ * @function append
250
+ * @tag view
251
+ * abc
252
+ */
253
+ "append",
254
+ /**
255
+ * @function after
256
+ * @tag view
257
+ * abc
258
+ */
259
+ "after",
260
+ /**
261
+ * @function before
262
+ * @tag view
263
+ * abc
264
+ */
265
+ "before",
266
+ /**
267
+ * @function replace
268
+ * @tag view
269
+ * abc
270
+ */
271
+ "replace",
272
+ /**
273
+ * @function text
274
+ * @tag view
275
+ * abc
276
+ */
277
+ "text",
278
+ /**
279
+ * @function html
280
+ * @tag view
281
+ * abc
282
+ */
283
+ "html",
284
+ /**
285
+ * @function replaceWith
286
+ * @tag view
287
+ * abc
288
+ */
289
+ "replaceWith"];
290
+
291
+ //go through helper funcs and convert
292
+ for ( var i = 0; i < funcs.length; i++ ) {
293
+ convert(funcs[i]);
294
+ }
295
+
296
+ })
@@ -0,0 +1,56 @@
1
+ #!/bin/sh
2
+ # This script checks for arguments, if they don't exist it opens the Rhino dialog
3
+ # if arguments do exist, it loads the script in the first argument and passes the other arguments to the script
4
+ # ie: ./js steal/script/controller Todo
5
+
6
+ if [ $# -eq 0 ]
7
+ then
8
+ java -cp steal/rhino/js.jar:funcunit/dist/selenium/selenium/selenium-java-client-driver.jar org.mozilla.javascript.tools.shell.Main
9
+ exit 127
10
+ fi
11
+ if [ $1 = "-selenium" ]
12
+ then
13
+ java -jar funcunit/dist/selenium/selenium/selenium-server.jar
14
+ exit 127
15
+ fi
16
+ CP=funcunit/dist/selenium/selenium/selenium-java-client-driver.jar:steal/rhino/js.jar
17
+ if [ $1 = "-mail" ]
18
+ then
19
+ CP=steal/rhino/mail.jar:funcunit/dist/selenium/selenium/selenium-java-client-driver.jar:steal/rhino/js.jar
20
+ shift
21
+ fi
22
+
23
+ if [ $1 = "-h" -o $1 = "-?" -o $1 = "--help" ]
24
+ then
25
+ echo Load a command line Rhino JavaScript environment or run JavaScript script files in Rhino.
26
+ echo Available commands:
27
+ echo -e "./js\t\t\t\tOpens a command line JavaScript environment"
28
+ echo -e "./js -d\t\t\t\tOpens the Rhino debugger"
29
+ echo -e "./js [FILE]\t\t\tRuns FILE in the Rhino environment"
30
+ echo -e ""
31
+ echo -e "JavaScriptMVC script usage:"
32
+ echo -e "./js steal/generate/app [NAME]\t\tCreates a new JavaScriptMVC application"
33
+ echo -e "./js steal/generate/page [APP] [PAGE]\tGenerates a page for the application"
34
+ echo -e "./js steal/generate/controller [NAME]\tGenerates a Controller file"
35
+ echo -e "./js steal/generate/model [TYPE] [NAME]\tGenerates a Model file"
36
+ echo -e "./js apps/[NAME]/compress.js\t\tCompress your application and generate documentation"
37
+ exit 127
38
+ fi
39
+
40
+
41
+ if [ $1 = "-d" ]
42
+ then
43
+ java -classpath steal/rhino/js.jar:steal/rhino/selenium-java-client-driver.jar org.mozilla.javascript.tools.debugger.Main
44
+ exit 127
45
+ fi
46
+
47
+ ARGS=[
48
+ for arg
49
+ do
50
+ if [ $arg != $1 ]
51
+ then
52
+ ARGS=$ARGS"'$arg'",
53
+ fi
54
+ done
55
+ ARGS=$ARGS]
56
+ java -Xss1024k -cp $CP org.mozilla.javascript.tools.shell.Main -e _args=$ARGS -opt -1 -e 'load('"'"$1"'"')'
@@ -0,0 +1,57 @@
1
+ :: This script checks for arguments, if they don't exist it opens the Rhino dialog
2
+ :: if arguments do exist, it loads the script in the first argument and passes the other arguments to the script
3
+ :: ie: js jmvc\script\controller Todo
4
+ @echo off
5
+ SETLOCAL ENABLEDELAYEDEXPANSION
6
+ if "%1"=="" (
7
+ java -cp steal\rhino\js.jar org.mozilla.javascript.tools.shell.Main
8
+ GOTO END
9
+ )
10
+ if "%1"=="-h" GOTO PRINT_HELP
11
+ if "%1"=="-?" GOTO PRINT_HELP
12
+ if "%1"=="--help" GOTO PRINT_HELP
13
+
14
+ if "%1"=="-d" (
15
+ java -classpath funcunit/dist/selenium/selenium/selenium-java-client-driver.jar;steal/rhino/js.jar org.mozilla.javascript.tools.debugger.Main
16
+ GOTO END
17
+ )
18
+ if "%1"=="-selenium" (
19
+ java -jar funcunit\java\selenium-server.jar
20
+ GOTO END
21
+ )
22
+ SET CP=funcunit/dist/selenium/selenium/selenium-java-client-driver.jar;steal\rhino\js.jar
23
+ if "%1"=="-mail" (
24
+ SET CP=steal/rhino/mail.jar;funcunit/dist/selenium/selenium/selenium-java-client-driver.jar;steal\rhino\js.jar
25
+ SHIFT /0
26
+ )
27
+ SET ARGS=[
28
+ SET FILENAME=%1
29
+ SET FILENAME=%FILENAME:\=/%
30
+ ::haven't seen any way to loop through all args yet, so for now this goes through arg 2-7
31
+ for /f "tokens=2,3,4,5,6,7 delims= " %%a in ("%*") do SET ARGS=!ARGS!'%%a','%%b','%%c','%%d','%%e','%%f'
32
+ ::remove the commas
33
+ for %%a in (",''=") do ( call set ARGS=%%ARGS:%%~a%% )
34
+ ::remove the spaces
35
+ for /f "tokens=1*" %%A in ("%ARGS%") do SET ARGS=%%A
36
+ SET ARGS=%ARGS%]
37
+ set ARGS=%ARGS:\=/%
38
+ java -Xss1024k -cp %CP% org.mozilla.javascript.tools.shell.Main -opt -1 -e _args=%ARGS% -e load('%FILENAME%')
39
+
40
+ GOTO END
41
+
42
+ :PRINT_HELP
43
+ echo Load a command line Rhino JavaScript environment or run JavaScript script files in Rhino.
44
+ echo Available commands:
45
+ echo js Opens a command line JavaScript environment
46
+ echo js -d Opens the Rhino debugger
47
+ echo js -selenium Starts selenium server
48
+ echo js [FILE] Runs FILE in the Rhino environment
49
+
50
+ echo JavaScriptMVC script usage:
51
+ echo js steal/generate/app [NAME] Creates a new JavaScriptMVC application
52
+ echo js steal/generate/page [APP] [PAGE] Generates a page for the application
53
+ echo js steal/generate/controller [NAME] Generates a Controller file
54
+ echo js steal/generate/model [TYPE] [NAME] Generates a Model file
55
+ echo js apps/[NAME]/compress.js Compress your application and generate documentation
56
+
57
+ :END
@@ -0,0 +1,26 @@
1
+ TOC:
2
+ A. How to get (and contribute) to JMVC
3
+
4
+
5
+ A. How to get (and contribute) JMVC
6
+
7
+ 1. Start a new project in git.
8
+
9
+ 2. Fork ....
10
+ http://github.com/jupiterjs/steal and
11
+ http://github.com/jupiterjs/javascriptmvc
12
+
13
+ 3. Add steal, javascriptmvc, funcunit, and documentjs as submodules of your project...
14
+ git submodule add git@github.com:_YOU_/steal.git steal
15
+ git submodule add git@github.com:_YOU_/javascriptmvc.git jquery
16
+ git submodule add git@github.com:_YOU_/funcunit.git funcunit
17
+ git submodule add git@github.com:_YOU_/documentjs.git documentjs
18
+
19
+ * Notice javascriptmvc is under the jquery folder
20
+
21
+ 4. Learn a little more about submodules ...
22
+ http://johnleach.co.uk/words/archives/2008/10/12/323/git-submodules-in-n-easy-steps
23
+
24
+ 5. Make changes in steal or jmvc, and push them back to your fork.
25
+
26
+ 6. Make a pull request to your fork.
@@ -0,0 +1,208 @@
1
+ steal(function( steal ) {
2
+
3
+ // recursively goes through steals and their dependencies.
4
+ var addDependencies = function( steel, files, app ) {
5
+ //add self to files
6
+ if ( !files[steel.path] ) {
7
+
8
+ var source = readFile(steel.path);
9
+ if ( steel.type && steal.build.types[steel.type] ) {
10
+
11
+ source = steal.build.types[steel.type]({
12
+ text: source,
13
+ id: steal.cleanId(steel.path)
14
+ });
15
+ print(" converting " + steel.path + " ");
16
+ } else {
17
+ print(" compressing " + steel.path + " ");
18
+
19
+ }
20
+ source = steal.build.builders.scripts.clean(source);
21
+ source = "" + steal.build.compressor(source, true);
22
+ //need to convert to other types.
23
+
24
+
25
+ files[steel.path] = {
26
+ path: steel.path,
27
+ apps: [],
28
+ dependencies: {},
29
+ size: source.length,
30
+ packaged: false,
31
+ source: source
32
+ }
33
+ }
34
+
35
+ var data = files[steel.path];
36
+
37
+ data.apps.push(app);
38
+ for ( var d = 0; d < steel.dependencies.length; d++ ) {
39
+ var dependency = steel.dependencies[d];
40
+ if ( dependency.dependencies ) { //this dependency was actually loaded
41
+ data.dependencies[dependency.path] = addDependencies(dependency, files, app);
42
+ }
43
+ }
44
+ return data;
45
+ },
46
+ /**
47
+ * Adds an order to a directed acyclic graph
48
+ * @param {Object} appFiles
49
+ */
50
+ orderFiles = function( appFiles ) {
51
+ var order = 0
52
+
53
+ function visit(f) {
54
+ if ( f.order === undefined ) {
55
+ for ( var name in f.dependencies ) {
56
+ visit(f.dependencies[name])
57
+ }
58
+ f.order = (order++);
59
+ }
60
+ }
61
+ for ( var d = 0; d < appFiles.length; d++ ) {
62
+ visit(appFiles[d])
63
+ }
64
+ },
65
+ getMostShared = function( files ) {
66
+ var shared = []; // count
67
+
68
+ for ( var fileName in files ) {
69
+ var file = files[fileName];
70
+ if ( file.packaged ) {
71
+ continue;
72
+ }
73
+ if (!shared[file.apps.length] ) {
74
+ shared[file.apps.length] = {};
75
+ }
76
+ var level = shared[file.apps.length]; //how many apps it is shared in (5?)
77
+
78
+
79
+ var appsName = file.apps.sort().join();
80
+
81
+
82
+
83
+ if (!level[appsName] ) {
84
+ level[appsName] = {
85
+ totalSize: 0,
86
+ files: [],
87
+ apps: file.apps
88
+ };
89
+ }
90
+ //add file, the count is how many files are shared among this many apps
91
+ level[appsName].files.push(file);
92
+ level[appsName].totalSize += file.size;
93
+ }
94
+ if (!shared.length ) {
95
+ return null;
96
+ }
97
+ //get the most
98
+ var mostShared = shared.pop(),
99
+ mostSize = 0,
100
+ most;
101
+ for ( var apps in mostShared ) {
102
+ if ( mostShared[apps].totalSize > mostSize ) {
103
+ most = mostShared[apps];
104
+ mostSize = most.totalSize;
105
+ }
106
+ }
107
+ //mark files
108
+
109
+ for ( var i = 0; i < most.files.length; i++ ) {
110
+ var f = most.files[i];
111
+ f.packaged = true;
112
+ }
113
+ return most;
114
+ }
115
+
116
+
117
+ steal.build.apps = function( list, options ) {
118
+ options = steal.opts(options || {}, {
119
+ //compress everything, regardless of what you find
120
+ depth: 1,
121
+ //folder to build to, defaults to the folder the page is in
122
+ to: 1
123
+ });
124
+ // set the compressor globally
125
+ steal.build.compressor = steal.build.builders.scripts.compressors[options.compressor || "localClosure"]();
126
+
127
+ //a list of files hashed by their path
128
+ var files = {},
129
+
130
+ //keeps track of the packages an app needs
131
+ apps = {},
132
+
133
+ //a list of the apps (top most dependencies)
134
+ appFiles = [];
135
+
136
+ //set defaults
137
+ options.depth = options.depth || 2;
138
+ options.to = options.to || "packages/"
139
+
140
+ //go through, open each app, and make dependency graph
141
+ for ( var i = 0; i < list.length; i++ ) {
142
+ var startFile = list[i] + "/" + steal.File(list[i]).basename() + ".js"
143
+
144
+ var opener = steal.build.open('steal/rhino/blank.html', {
145
+ startFile: startFile
146
+ })
147
+ appFiles.push(addDependencies(opener.steal._start, files, list[i]));
148
+ apps[list[i]] = [];
149
+
150
+ }
151
+
152
+ //add an order so we can sort them nicely
153
+ orderFiles(appFiles);
154
+
155
+ // will be set to the biggest group
156
+ var pack,
157
+ //the package number
158
+ packageCount = 0;
159
+
160
+ //while there are files left to be packaged, get the most shared and largest package
161
+ while ((pack = getMostShared(files))) {
162
+
163
+ print('\njoining shared by ' + pack.apps.join(", "))
164
+
165
+ //the source of the package
166
+ var src = [],
167
+
168
+ //order the files, most base file first
169
+ ordered = pack.files.sort(function( f1, f2 ) {
170
+ return f1.order - f2.order;
171
+ });
172
+
173
+ // paths to files this package represents
174
+ var paths = [];
175
+
176
+ //go through files, put in src, and track
177
+ for ( var i = 0; i < ordered.length; i++ ) {
178
+ var f = ordered[i];
179
+ src.push("/* " + f.path + " */\n" + f.source);
180
+ print(" " + f.order + ":" + f.path);
181
+ paths.push(f.path)
182
+ }
183
+
184
+ //the final source, includes a steal of all the files in this source
185
+ var source = "steal('//" + paths.join("'\n,'//") + "');\nsteal.end();\n" + src.join(";steal.end();\n"),
186
+
187
+ //the path to save
188
+ saveFile = pack.apps.length == 1 ? pack.apps[0] + "/production.js" : "packages/" + packageCount + ".js";
189
+
190
+ //if we are the top most, replace production file with the following
191
+ if ( pack.apps.length == 1 ) {
192
+ var packages = apps[pack.apps[0]];
193
+ source = "steal.packs('" + packages.join("','") + "', function(){\n" + source + "\n});"
194
+ }
195
+
196
+ //save the file
197
+ print("saving " + saveFile);
198
+ steal.File(saveFile).save(source);
199
+
200
+ //add this package to the app's packages list
201
+ for ( var pa = 0; pa < pack.apps.length; pa++ ) {
202
+ apps[pack.apps[pa]].push(packageCount);
203
+ }
204
+ packageCount++;
205
+ }
206
+
207
+ }
208
+ })