javascriptmvc 3.0.0.pre15
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/README.markdown +15 -0
- data/Rakefile +17 -0
- data/VERSION +1 -0
- data/bin/jmvc-build +4 -0
- data/bin/jmvc-gen +4 -0
- data/bin/jmvc-get +4 -0
- data/bin/jmvc-init +4 -0
- data/bin/jmvc-update +4 -0
- data/lib/javascriptmvc.rb +97 -0
- data/lib/javascriptmvc/documentjs/README +0 -0
- data/lib/javascriptmvc/documentjs/add.js +76 -0
- data/lib/javascriptmvc/documentjs/application.js +285 -0
- data/lib/javascriptmvc/documentjs/attribute.js +61 -0
- data/lib/javascriptmvc/documentjs/baseclass.js +537 -0
- data/lib/javascriptmvc/documentjs/class.js +141 -0
- data/lib/javascriptmvc/documentjs/constructor.js +145 -0
- data/lib/javascriptmvc/documentjs/directives.js +394 -0
- data/lib/javascriptmvc/documentjs/distance.js +49 -0
- data/lib/javascriptmvc/documentjs/document +21 -0
- data/lib/javascriptmvc/documentjs/documentjs.js +76 -0
- data/lib/javascriptmvc/documentjs/file.js +55 -0
- data/lib/javascriptmvc/documentjs/function.js +112 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/close.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/download.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-off.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/fav-on.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/favicon.ico +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/logo.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/pre.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_222222_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_454545_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_888888_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/images/video.png +0 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/production.js +552 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/style.css +354 -0
- data/lib/javascriptmvc/documentjs/jmvcdoc/summary.ejs +134 -0
- data/lib/javascriptmvc/documentjs/json.js +172 -0
- data/lib/javascriptmvc/documentjs/page.js +107 -0
- data/lib/javascriptmvc/documentjs/pair.js +302 -0
- data/lib/javascriptmvc/documentjs/prototype.js +13 -0
- data/lib/javascriptmvc/documentjs/scripts/build.js +6 -0
- data/lib/javascriptmvc/documentjs/static.js +25 -0
- data/lib/javascriptmvc/documentjs/test/docs/Something.json +1 -0
- data/lib/javascriptmvc/documentjs/test/docs/searchData.json +1 -0
- data/lib/javascriptmvc/documentjs/test/something.js +8 -0
- data/lib/javascriptmvc/documentjs/test/test.html +6 -0
- data/lib/javascriptmvc/documentjs/test_doc.html +1 -0
- data/lib/javascriptmvc/documentjs/update +5 -0
- data/lib/javascriptmvc/funcunit/README +17 -0
- data/lib/javascriptmvc/funcunit/autosuggest/auto_suggest.js +495 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.css +24 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.html +26 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest.js +17 -0
- data/lib/javascriptmvc/funcunit/autosuggest/autosuggest_test.js +14 -0
- data/lib/javascriptmvc/funcunit/autosuggest/funcunit.html +15 -0
- data/lib/javascriptmvc/funcunit/build.js +54 -0
- data/lib/javascriptmvc/funcunit/drivers/selenium.js +129 -0
- data/lib/javascriptmvc/funcunit/drivers/standard.js +169 -0
- data/lib/javascriptmvc/funcunit/envjs +13 -0
- data/lib/javascriptmvc/funcunit/envjs.bat +28 -0
- data/lib/javascriptmvc/funcunit/funcunit.html +20 -0
- data/lib/javascriptmvc/funcunit/funcunit.js +1509 -0
- data/lib/javascriptmvc/funcunit/java/selenium-java-client-driver.jar +0 -0
- data/lib/javascriptmvc/funcunit/java/selenium-server.jar +0 -0
- data/lib/javascriptmvc/funcunit/qunit.html +22 -0
- data/lib/javascriptmvc/funcunit/qunit/qunit.css +119 -0
- data/lib/javascriptmvc/funcunit/qunit/qunit.js +1124 -0
- data/lib/javascriptmvc/funcunit/qunit/rhino/rhino.js +24 -0
- data/lib/javascriptmvc/funcunit/qunit/test/qunit.html +18 -0
- data/lib/javascriptmvc/funcunit/qunit/test/test.js +7 -0
- data/lib/javascriptmvc/funcunit/resources/funcunit.js +31 -0
- data/lib/javascriptmvc/funcunit/resources/jquery.js +6378 -0
- data/lib/javascriptmvc/funcunit/resources/json.js +201 -0
- data/lib/javascriptmvc/funcunit/resources/selenium_start.js +43 -0
- data/lib/javascriptmvc/funcunit/scripts/run.js +36 -0
- data/lib/javascriptmvc/funcunit/scripts/test.js +55 -0
- data/lib/javascriptmvc/funcunit/settings.js +10 -0
- data/lib/javascriptmvc/funcunit/synthetic/browsers.js +151 -0
- data/lib/javascriptmvc/funcunit/synthetic/demo.html +150 -0
- data/lib/javascriptmvc/funcunit/synthetic/demo/record.js +254 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/drag.html +41 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/drag.js +268 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/qunit.html +20 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/drag_test.js +195 -0
- data/lib/javascriptmvc/funcunit/synthetic/drag/test/qunit/qunit.js +7 -0
- data/lib/javascriptmvc/funcunit/synthetic/key.js +832 -0
- data/lib/javascriptmvc/funcunit/synthetic/mouse.js +291 -0
- data/lib/javascriptmvc/funcunit/synthetic/qunit.html +22 -0
- data/lib/javascriptmvc/funcunit/synthetic/recorder.html +303 -0
- data/lib/javascriptmvc/funcunit/synthetic/synthetic.html +85 -0
- data/lib/javascriptmvc/funcunit/synthetic/synthetic.js +796 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/key_test.js +391 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/mouse_test.js +233 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/qunit/synthetic_test.js +91 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/submit.html +29 -0
- data/lib/javascriptmvc/funcunit/synthetic/test/submitted.html +3 -0
- data/lib/javascriptmvc/funcunit/template.html +18 -0
- data/lib/javascriptmvc/funcunit/test/drag.html +63 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/funcunit_test.js +87 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/open_test.js +28 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/protodrag_test.js +13 -0
- data/lib/javascriptmvc/funcunit/test/funcunit/syn_test.js +41 -0
- data/lib/javascriptmvc/funcunit/test/jquery.event.drag.js +801 -0
- data/lib/javascriptmvc/funcunit/test/jquery.event.drop.js +439 -0
- data/lib/javascriptmvc/funcunit/test/jquery.js +6360 -0
- data/lib/javascriptmvc/funcunit/test/myapp.html +103 -0
- data/lib/javascriptmvc/funcunit/test/myotherapp.html +15 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/dragdrop.js +974 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/effects.js +1123 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/funcunit_test.js +20 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/myapp.html +63 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/prototype.js +4874 -0
- data/lib/javascriptmvc/funcunit/test/protodrag/scriptaculous.js +68 -0
- data/lib/javascriptmvc/funcunit/update +5 -0
- data/lib/javascriptmvc/jquery/README +24 -0
- data/lib/javascriptmvc/jquery/build.js +73 -0
- data/lib/javascriptmvc/jquery/class/class.html +109 -0
- data/lib/javascriptmvc/jquery/class/class.js +627 -0
- data/lib/javascriptmvc/jquery/class/qunit.html +15 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/class_test.js +146 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/class/test/qunit/test.html +20 -0
- data/lib/javascriptmvc/jquery/controller/controller.html +89 -0
- data/lib/javascriptmvc/jquery/controller/controller.js +735 -0
- data/lib/javascriptmvc/jquery/controller/history/history.html +44 -0
- data/lib/javascriptmvc/jquery/controller/history/history.js +177 -0
- data/lib/javascriptmvc/jquery/controller/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/scripts/docs.js +6 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.html +56 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/subscribe.js +27 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/funcunit/subscribe_test.js +11 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/controller/subscribe/test/qunit/subscribe_test.js +4 -0
- data/lib/javascriptmvc/jquery/controller/test/qunit/controller_test.js +170 -0
- data/lib/javascriptmvc/jquery/controller/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/controller/view/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/controller_view_test.js +15 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/controller/view/test/qunit/views/init.micro +1 -0
- data/lib/javascriptmvc/jquery/controller/view/view.js +102 -0
- data/lib/javascriptmvc/jquery/dom/closest/closest.html +23 -0
- data/lib/javascriptmvc/jquery/dom/closest/closest.js +47 -0
- data/lib/javascriptmvc/jquery/dom/closest/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/dom/closest/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/dom/closest/scripts/test.js +55 -0
- data/lib/javascriptmvc/jquery/dom/closest/settings.js +40 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/closest/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/dom/compare/compare.html +88 -0
- data/lib/javascriptmvc/jquery/dom/compare/compare.js +67 -0
- data/lib/javascriptmvc/jquery/dom/compare/qunit.html +20 -0
- data/lib/javascriptmvc/jquery/dom/compare/test/qunit/compare_test.js +19 -0
- data/lib/javascriptmvc/jquery/dom/compare/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/dom/cookie/cookie.html +25 -0
- data/lib/javascriptmvc/jquery/dom/cookie/cookie.js +119 -0
- data/lib/javascriptmvc/jquery/dom/cookie/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/dom/cookie/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/cookie_test.js +11 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/cookie_test.js +4 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/dom/cookie/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.html +71 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/cur_styles.js +120 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/curStyles.micro +3 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/cur_styles_test.js +22 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/outer.micro +0 -0
- data/lib/javascriptmvc/jquery/dom/cur_styles/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/curstyles.html +22 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.html +132 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/dimensions.js +140 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/curStyles.micro +3 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/dimensions_test.js +8 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/outer.micro +0 -0
- data/lib/javascriptmvc/jquery/dom/dimensions/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/dom.js +7 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixture.html +143 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixture.js +521 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixtures/messages.html +31 -0
- data/lib/javascriptmvc/jquery/dom/fixture/fixtures/test.json +3 -0
- data/lib/javascriptmvc/jquery/dom/fixture/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/fixture_test.js +50 -0
- data/lib/javascriptmvc/jquery/dom/fixture/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/form_params/form_params.html +57 -0
- data/lib/javascriptmvc/jquery/dom/form_params/form_params.js +106 -0
- data/lib/javascriptmvc/jquery/dom/form_params/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/basics.micro +27 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/checkbox.micro +20 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/form_params_test.js +43 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/dom/form_params/test/qunit/truthy.micro +8 -0
- data/lib/javascriptmvc/jquery/dom/within/within.js +67 -0
- data/lib/javascriptmvc/jquery/error/background.png +0 -0
- data/lib/javascriptmvc/jquery/error/error.html +31 -0
- data/lib/javascriptmvc/jquery/error/error.js +227 -0
- data/lib/javascriptmvc/jquery/error/setup.js +4 -0
- data/lib/javascriptmvc/jquery/error/test/test.html +23 -0
- data/lib/javascriptmvc/jquery/error/test/test.js +4 -0
- data/lib/javascriptmvc/jquery/event/default/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/default/default.html +85 -0
- data/lib/javascriptmvc/jquery/event/default/default.js +193 -0
- data/lib/javascriptmvc/jquery/event/default/defaultjquery.html +117 -0
- data/lib/javascriptmvc/jquery/event/default/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/default_test.js +104 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/html.micro +8 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/event/default/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed.html +24 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed.js +40 -0
- data/lib/javascriptmvc/jquery/event/destroyed/destroyed_menu.html +96 -0
- data/lib/javascriptmvc/jquery/event/destroyed/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/destroyed_test.js +12 -0
- data/lib/javascriptmvc/jquery/event/destroyed/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/drag.html +105 -0
- data/lib/javascriptmvc/jquery/event/drag/drag.js +466 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/limit.html +74 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/limit.js +56 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/limit_test.js +11 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/limit_test.js +4 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/event/drag/limit/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/drag/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/event/drag/scroll/scroll.js +120 -0
- data/lib/javascriptmvc/jquery/event/drag/test/qunit/drag_test.js +130 -0
- data/lib/javascriptmvc/jquery/event/drag/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/drop/drop.html +74 -0
- data/lib/javascriptmvc/jquery/event/drop/drop.js +301 -0
- data/lib/javascriptmvc/jquery/event/event.js +6 -0
- data/lib/javascriptmvc/jquery/event/hashchange/hashchange.js +245 -0
- data/lib/javascriptmvc/jquery/event/hover/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/hover/hover.html +56 -0
- data/lib/javascriptmvc/jquery/event/hover/hover.js +219 -0
- data/lib/javascriptmvc/jquery/event/hover/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/event/hover/test/qunit/hover_test.js +55 -0
- data/lib/javascriptmvc/jquery/event/hover/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/livehack/compress.js +7 -0
- data/lib/javascriptmvc/jquery/event/livehack/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/livehack/livehack.html +25 -0
- data/lib/javascriptmvc/jquery/event/livehack/livehack.js +167 -0
- data/lib/javascriptmvc/jquery/event/offline/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/event/offline/offline.html +26 -0
- data/lib/javascriptmvc/jquery/event/offline/offline.js +36 -0
- data/lib/javascriptmvc/jquery/event/offline/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/offline/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/event/offline/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/event/offline/settings.js +41 -0
- data/lib/javascriptmvc/jquery/event/offline/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/offline/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/event/offline/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/offline/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/funcunit.html +20 -0
- data/lib/javascriptmvc/jquery/event/resize/qunit.html +22 -0
- data/lib/javascriptmvc/jquery/event/resize/resize.html +23 -0
- data/lib/javascriptmvc/jquery/event/resize/resize.js +50 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/compress.js +3 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/doc.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/scripts/test.js +55 -0
- data/lib/javascriptmvc/jquery/event/resize/settings.js +40 -0
- data/lib/javascriptmvc/jquery/event/resize/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/resize/test/funcunit/tests/basic.js +11 -0
- data/lib/javascriptmvc/jquery/event/resize/test/qunit/qunit.js +4 -0
- data/lib/javascriptmvc/jquery/event/resize/test/qunit/tests/basic.js +4 -0
- data/lib/javascriptmvc/jquery/event/select/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/event/select/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/event/select/select.html +63 -0
- data/lib/javascriptmvc/jquery/event/select/select.js +65 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/event/select/test/funcunit/select_test.js +11 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/event/select/test/qunit/select_test.js +4 -0
- data/lib/javascriptmvc/jquery/generate/app +23 -0
- data/lib/javascriptmvc/jquery/generate/controller +21 -0
- data/lib/javascriptmvc/jquery/generate/model +26 -0
- data/lib/javascriptmvc/jquery/generate/page +20 -0
- data/lib/javascriptmvc/jquery/generate/plugin +20 -0
- data/lib/javascriptmvc/jquery/generate/scaffold +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).css.ejs +4 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).html.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/(application_name).js.ejs +21 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/controllers/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/docs/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/fixtures/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/funcunit.html.ejs +15 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/models/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/qunit.html.ejs +20 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/resources/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/build.js.ejs +6 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/clean.js.ejs +6 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/scripts/docs.js.ejs +4 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/(application_name)_test.js.ejs +9 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/funcunit/funcunit.js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/(application_name)_test.js.ejs +5 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/test/qunit/qunit.js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/app/views/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/controller/controllers/(underscore)_controller.js.ejs +12 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/fixtures.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/models.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/model/test/qunit.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/page.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).html.ejs +23 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/(application_name).js.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/fixtures/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/funcunit.html.ejs +15 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/qunit.html.ejs +20 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/resources/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/scripts.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/test.link +1 -0
- data/lib/javascriptmvc/jquery/generate/templates/plugin/views/.ignore +0 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/controllers/(underscore)_controller.js.ejs +96 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/fixtures/(plural).json.get.ejs +3 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/models/(underscore).js.ejs +83 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/funcunit/(underscore)_controller_test.js.ejs +63 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/test/qunit/(underscore)_test.js.ejs +45 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/edit.ejs.ejs +10 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/init.ejs.ejs +26 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/list.ejs.ejs +5 -0
- data/lib/javascriptmvc/jquery/generate/templates/scaffold/views/(underscore)/show.ejs.ejs +10 -0
- data/lib/javascriptmvc/jquery/jquery.js +6360 -0
- data/lib/javascriptmvc/jquery/lang/json/json.html +25 -0
- data/lib/javascriptmvc/jquery/lang/json/json.js +201 -0
- data/lib/javascriptmvc/jquery/lang/json/scripts/compress.js +6 -0
- data/lib/javascriptmvc/jquery/lang/json/scripts/doc.js +6 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/json_test.js +11 -0
- data/lib/javascriptmvc/jquery/lang/json/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/json_test.js +4 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/lang/json/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/lang/lang.html +27 -0
- data/lib/javascriptmvc/jquery/lang/lang.js +104 -0
- data/lib/javascriptmvc/jquery/lang/openajax/openajax.js +202 -0
- data/lib/javascriptmvc/jquery/lang/rsplit/rsplit.js +31 -0
- data/lib/javascriptmvc/jquery/lang/vector/vector.js +167 -0
- data/lib/javascriptmvc/jquery/model/associations/associations.html +25 -0
- data/lib/javascriptmvc/jquery/model/associations/associations.js +46 -0
- data/lib/javascriptmvc/jquery/model/associations/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/associations_test.js +51 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/model/associations/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/model/backup/backup.js +82 -0
- data/lib/javascriptmvc/jquery/model/json_rest/json_rest.js +91 -0
- data/lib/javascriptmvc/jquery/model/list/list.js +148 -0
- data/lib/javascriptmvc/jquery/model/list/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/list_test.js +58 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/qunit.js +6 -0
- data/lib/javascriptmvc/jquery/model/list/test/qunit/run.js +0 -0
- data/lib/javascriptmvc/jquery/model/model.js +537 -0
- data/lib/javascriptmvc/jquery/model/qunit.html +17 -0
- data/lib/javascriptmvc/jquery/model/store/store.js +66 -0
- data/lib/javascriptmvc/jquery/model/test/qunit/model_test.js +71 -0
- data/lib/javascriptmvc/jquery/model/test/qunit/qunit.js +5 -0
- data/lib/javascriptmvc/jquery/qunit.html +15 -0
- data/lib/javascriptmvc/jquery/test/funcunit/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/test/funcunit/jquerytest_test.js +11 -0
- data/lib/javascriptmvc/jquery/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/test/qunit/qunit.js +22 -0
- data/lib/javascriptmvc/jquery/update +5 -0
- data/lib/javascriptmvc/jquery/view/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/ejs/ejs.html +25 -0
- data/lib/javascriptmvc/jquery/view/ejs/ejs.js +489 -0
- data/lib/javascriptmvc/jquery/view/ejs/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/ejs_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/ejs_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/ejs/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/fulljslint.js +3774 -0
- data/lib/javascriptmvc/jquery/view/helpers/helpers.js +338 -0
- data/lib/javascriptmvc/jquery/view/jaml/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/jaml/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/jaml/jaml.html +25 -0
- data/lib/javascriptmvc/jquery/view/jaml/jaml.js +73 -0
- data/lib/javascriptmvc/jquery/view/jaml/node.js +149 -0
- data/lib/javascriptmvc/jquery/view/jaml/template.js +131 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/jaml_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/jaml_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/jaml/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/micro/compress.js +7 -0
- data/lib/javascriptmvc/jquery/view/micro/funcunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/micro/micro.html +25 -0
- data/lib/javascriptmvc/jquery/view/micro/micro.js +57 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/micro_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/micro/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/micro_test.js +4 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.html +21 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/micro/test/qunit/run.js +2 -0
- data/lib/javascriptmvc/jquery/view/qunit.html +16 -0
- data/lib/javascriptmvc/jquery/view/test/compression/compression.html +12 -0
- data/lib/javascriptmvc/jquery/view/test/compression/compression.js +11 -0
- data/lib/javascriptmvc/jquery/view/test/compression/run.js +36 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/funcunit.js +3 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/run.js +10 -0
- data/lib/javascriptmvc/jquery/view/test/funcunit/view_test.js +11 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/nested_plugin.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/plugin.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/qunit.js +9 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.ejs +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.jaml +3 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.micro +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/template.tmpl +1 -0
- data/lib/javascriptmvc/jquery/view/test/qunit/view_test.js +24 -0
- data/lib/javascriptmvc/jquery/view/tmpl/tmpl.js +150 -0
- data/lib/javascriptmvc/jquery/view/view.html +65 -0
- data/lib/javascriptmvc/jquery/view/view.js +296 -0
- data/lib/javascriptmvc/js +56 -0
- data/lib/javascriptmvc/js.bat +57 -0
- data/lib/javascriptmvc/steal/README +26 -0
- data/lib/javascriptmvc/steal/build/apps/apps.js +208 -0
- data/lib/javascriptmvc/steal/build/apps/test.js +4 -0
- data/lib/javascriptmvc/steal/build/build.js +281 -0
- data/lib/javascriptmvc/steal/build/pluginify.js +73 -0
- data/lib/javascriptmvc/steal/build/scripts/compiler.jar +0 -0
- data/lib/javascriptmvc/steal/build/scripts/scripts.js +155 -0
- data/lib/javascriptmvc/steal/build/styles/cssmin.js +17 -0
- data/lib/javascriptmvc/steal/build/styles/styles.js +84 -0
- data/lib/javascriptmvc/steal/build/test/basicpage.html +6 -0
- data/lib/javascriptmvc/steal/build/test/basicproduction.js +1 -0
- data/lib/javascriptmvc/steal/build/test/basicsource.js +6 -0
- data/lib/javascriptmvc/steal/build/test/css/css/css1.css +1 -0
- data/lib/javascriptmvc/steal/build/test/css/css/justin.png +0 -0
- data/lib/javascriptmvc/steal/build/test/css/css2.css +5 -0
- data/lib/javascriptmvc/steal/build/test/css/page.html +9 -0
- data/lib/javascriptmvc/steal/build/test/css/production.css +1 -0
- data/lib/javascriptmvc/steal/build/test/css/test.js +7 -0
- data/lib/javascriptmvc/steal/build/test/css/upload.PNG +0 -0
- data/lib/javascriptmvc/steal/build/test/foreign.html +6 -0
- data/lib/javascriptmvc/steal/build/test/foreign.js +2 -0
- data/lib/javascriptmvc/steal/build/test/removecode.js +11 -0
- data/lib/javascriptmvc/steal/build/test/run.js +57 -0
- data/lib/javascriptmvc/steal/build/test/stealpage.html +10 -0
- data/lib/javascriptmvc/steal/build/test/stealprodpage.html +10 -0
- data/lib/javascriptmvc/steal/build/test/test.js +3 -0
- data/lib/javascriptmvc/steal/buildjs +21 -0
- data/lib/javascriptmvc/steal/clean/beautify.js +1108 -0
- data/lib/javascriptmvc/steal/clean/clean.js +179 -0
- data/lib/javascriptmvc/steal/clean/jslint.js +5662 -0
- data/lib/javascriptmvc/steal/clean/test.js +7 -0
- data/lib/javascriptmvc/steal/cleanjs +5 -0
- data/lib/javascriptmvc/steal/coffee/coffee-script.js +9 -0
- data/lib/javascriptmvc/steal/coffee/coffee.js +56 -0
- data/lib/javascriptmvc/steal/dev/dev.js +83 -0
- data/lib/javascriptmvc/steal/end.js +1 -0
- data/lib/javascriptmvc/steal/generate/app +23 -0
- data/lib/javascriptmvc/steal/generate/ejs.js +470 -0
- data/lib/javascriptmvc/steal/generate/generate.js +211 -0
- data/lib/javascriptmvc/steal/generate/inflector.js +117 -0
- data/lib/javascriptmvc/steal/generate/system.js +33 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).css.ejs +10 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).html.ejs +18 -0
- data/lib/javascriptmvc/steal/generate/templates/app/(application_name).js.ejs +10 -0
- data/lib/javascriptmvc/steal/generate/templates/app/docs/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.coffee.ejs +5 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.js.ejs +13 -0
- data/lib/javascriptmvc/steal/generate/templates/app/resources/example.less.ejs +9 -0
- data/lib/javascriptmvc/steal/generate/templates/app/scripts/build.js.ejs +6 -0
- data/lib/javascriptmvc/steal/generate/templates/app/scripts/clean.js.ejs +6 -0
- data/lib/javascriptmvc/steal/generate/templates/app/test/.ignore +0 -0
- data/lib/javascriptmvc/steal/generate/templates/page.ejs +23 -0
- data/lib/javascriptmvc/steal/generate/test/test.js +92 -0
- data/lib/javascriptmvc/steal/get/get.js +163 -0
- data/lib/javascriptmvc/steal/get/gets.json +10 -0
- data/lib/javascriptmvc/steal/get/getter.js +115 -0
- data/lib/javascriptmvc/steal/get/github.js +134 -0
- data/lib/javascriptmvc/steal/get/json.js +172 -0
- data/lib/javascriptmvc/steal/getjs +5 -0
- data/lib/javascriptmvc/steal/js +56 -0
- data/lib/javascriptmvc/steal/js.bat +57 -0
- data/lib/javascriptmvc/steal/less/less.js +117 -0
- data/lib/javascriptmvc/steal/less/less_engine.js +2529 -0
- data/lib/javascriptmvc/steal/rhino/blank.html +6 -0
- data/lib/javascriptmvc/steal/rhino/build.js +31 -0
- data/lib/javascriptmvc/steal/rhino/docs.js +68 -0
- data/lib/javascriptmvc/steal/rhino/empty.html +12 -0
- data/lib/javascriptmvc/steal/rhino/env.js +11537 -0
- data/lib/javascriptmvc/steal/rhino/file.js +299 -0
- data/lib/javascriptmvc/steal/rhino/js.jar +0 -0
- data/lib/javascriptmvc/steal/rhino/loader.js +8 -0
- data/lib/javascriptmvc/steal/rhino/prompt.js +49 -0
- data/lib/javascriptmvc/steal/rhino/steal.js +122 -0
- data/lib/javascriptmvc/steal/rhino/test.js +16 -0
- data/lib/javascriptmvc/steal/steal.js +1317 -0
- data/lib/javascriptmvc/steal/steal.production.js +23 -0
- data/lib/javascriptmvc/steal/test/absoluteurl.html +7 -0
- data/lib/javascriptmvc/steal/test/absoluteurl/absoluteurl.js +1 -0
- data/lib/javascriptmvc/steal/test/absoluteurl/alert.js +1 -0
- data/lib/javascriptmvc/steal/test/another/two.js +2 -0
- data/lib/javascriptmvc/steal/test/one/four.js +1 -0
- data/lib/javascriptmvc/steal/test/one/one.js +6 -0
- data/lib/javascriptmvc/steal/test/qunit/qunit.html +22 -0
- data/lib/javascriptmvc/steal/test/qunit/qunit.js +3 -0
- data/lib/javascriptmvc/steal/test/qunit/steal_test.js +197 -0
- data/lib/javascriptmvc/steal/test/run.js +12 -0
- data/lib/javascriptmvc/steal/test/steal.html +37 -0
- data/lib/javascriptmvc/steal/test/test.js +82 -0
- data/lib/javascriptmvc/steal/test/three.js +3 -0
- data/lib/javascriptmvc/steal/testing/test.html +20 -0
- data/lib/javascriptmvc/steal/testing/testing.js +48 -0
- data/lib/javascriptmvc/steal/update +5 -0
- metadata +622 -0
@@ -0,0 +1,281 @@
|
|
1
|
+
//used to build a page's script
|
2
|
+
/*global steal : false, Envjs : false, jQuery : false*/
|
3
|
+
|
4
|
+
steal(function( steal ) {
|
5
|
+
var window = (function() {
|
6
|
+
return this;
|
7
|
+
}).call(null, 0);
|
8
|
+
|
9
|
+
/**
|
10
|
+
*
|
11
|
+
* @parent stealjs
|
12
|
+
*
|
13
|
+
* <p>Builds an html page's JavaScript and CSS files by compressing and concatenating them into
|
14
|
+
* a single or several files.
|
15
|
+
* </p>
|
16
|
+
* <p>Steal can also build multiple applications at the same time and separate
|
17
|
+
* shared dependencies into standalone cache-able scripts.</p>
|
18
|
+
* <h2>How it works</h2>
|
19
|
+
* <p><code>Steal.build</code> opens a page in Envjs to extract all scripts and styles
|
20
|
+
* from the page. It compresses the resources into production.js and production.css
|
21
|
+
* files.</p>
|
22
|
+
* <p>Steal.build works with or without using steal.js, so it could work with other script loaders.</p>
|
23
|
+
*
|
24
|
+
*
|
25
|
+
* <h2>Building with steal.js.</h2>
|
26
|
+
* <p>Building with steal is easy, just point the <code>steal/buildjs</code> script at your page and
|
27
|
+
* give it the name of your application folder:</p>
|
28
|
+
* @codestart no-highlight
|
29
|
+
* js steal/buildjs path/to/page.html -to myapp
|
30
|
+
* @codeend
|
31
|
+
* <p>If you generated a steal app or plugin, there's a handy script already ready for you:</p>
|
32
|
+
* @codestart no-highlight
|
33
|
+
* js myapp/scripts/build.js
|
34
|
+
* @codeend
|
35
|
+
* <h2>Building without steal.js</h2>
|
36
|
+
* You can compress and package any page's JavaScript by adding <code>compress="true"</code>
|
37
|
+
* attributes to your script tag like the following:
|
38
|
+
* @codestart html
|
39
|
+
* <script src="file1.js" type="text/javascript" compress="true"></script>
|
40
|
+
* <script src="file2.js" type="text/javascript" compress="true"></script>
|
41
|
+
* @codeend
|
42
|
+
* and then running either:
|
43
|
+
* @codestart no-highlight
|
44
|
+
* js steal/buildjs path/to/page.html -to [OUTPUT_FOLDER]
|
45
|
+
* @codeend
|
46
|
+
* or:
|
47
|
+
* @codestart no-highlight
|
48
|
+
* js steal/buildjs http://hostname/path/page.html -to [OUTPUT_FOLDER]
|
49
|
+
* @codeend
|
50
|
+
* This will compress file1.js and file2.js into a file package named production.js an put it in OUTPUT_FOLDER.
|
51
|
+
*
|
52
|
+
* <h2>Common Problems</h2>
|
53
|
+
* <p>If you are getting errors building a production build, it's almost certainly because Envjs is
|
54
|
+
* close, but not quite a fully featured browser. So, you have to avoid doing things in your page that
|
55
|
+
* Envjs doesn't like before onload. The most common problems are:</p>
|
56
|
+
* <h5>Malformed HTML or unescaped characters</h5>
|
57
|
+
* <p>Steal does not have as tolerant of an HTML parser as Firefox. Make sure your page's tags look good.
|
58
|
+
* Also, make sure you escape characters like & to &amp;
|
59
|
+
* </p>
|
60
|
+
* <h5>DOM manipulations before onload</h5>
|
61
|
+
* <p>EnvJS supports most DOM manipulations. But, it's not a graphical browser so it completely punts
|
62
|
+
* on styles and dimensional DOM features. It's easy to protect against this, just wait until
|
63
|
+
* document ready or onload to do these things.
|
64
|
+
* </p>
|
65
|
+
* <h5>Unending timeouts or intervals before onload</h5>
|
66
|
+
* <p>Envjs won't quit running until all timeouts or intervals have completed. If you have a reoccuring
|
67
|
+
* 'process', consider starting it on document ready or onload.</p>
|
68
|
+
* <h2>Building With Shared Dependencies</h2>
|
69
|
+
* <p>
|
70
|
+
* If you are using steal in a setting with multiple pages loading similar
|
71
|
+
* functionality, it's typically a good idea to build the shared functionality in
|
72
|
+
* its own script. This way when a user switches pages, they don't have to load
|
73
|
+
* that functionality again.
|
74
|
+
* </p>
|
75
|
+
* <p>
|
76
|
+
* To do this, use the buildjs script with the names of your apps:
|
77
|
+
* </p>
|
78
|
+
* @codestart
|
79
|
+
* ./js steal/buildjs myco/search myco/searchresults music
|
80
|
+
* @codeend
|
81
|
+
* <h2>steal.build function</h2>
|
82
|
+
* Takes a url, extracts
|
83
|
+
* @param {String} url an html page to compress
|
84
|
+
* @param {Object} options An object literal with the following optional values:
|
85
|
+
* <table class='options'>
|
86
|
+
* <tr>
|
87
|
+
* <th>Name</th><th>Description</th>
|
88
|
+
* </tr>
|
89
|
+
* <tr><td>to</td>
|
90
|
+
* <td>The folder to put the production.js and production.css files.</td></tr>
|
91
|
+
* <tr><td>all</td>
|
92
|
+
* <td>Concat and compress all scripts and styles. By default, this is set to false, meaning
|
93
|
+
* scripts and styles have to opt into being compress with the <code>compress='true'</code> attribute.</td></tr>
|
94
|
+
* </table>
|
95
|
+
*/
|
96
|
+
steal.build = function( url, options ) {
|
97
|
+
|
98
|
+
//convert options (which might be an array) into an object
|
99
|
+
options = steal.opts(options || {}, {
|
100
|
+
//compress everything, regardless of what you find
|
101
|
+
all: 1,
|
102
|
+
//folder to build to, defaults to the folder the page is in
|
103
|
+
to: 1
|
104
|
+
});
|
105
|
+
|
106
|
+
// to is the folder packages will be put in
|
107
|
+
options.to = options.to || (url.match(/https?:\/\//) ?
|
108
|
+
"" :
|
109
|
+
url.substr(0, url.lastIndexOf('/')));
|
110
|
+
|
111
|
+
// make sure to ends with /
|
112
|
+
if ( options.to.match(/\\$/) === null && options.to !== '' ) {
|
113
|
+
options.to += "/";
|
114
|
+
}
|
115
|
+
|
116
|
+
print("Building to " + options.to);
|
117
|
+
|
118
|
+
var opener = steal.build.open(url);
|
119
|
+
|
120
|
+
// iterates through the types of builders. For now
|
121
|
+
// there are just scripts and styles builders
|
122
|
+
for ( var builder in steal.build.builders ) {
|
123
|
+
steal.build.builders[builder](opener, options);
|
124
|
+
}
|
125
|
+
};
|
126
|
+
|
127
|
+
// a place for the builders
|
128
|
+
steal.build.builders = {}; //builders
|
129
|
+
|
130
|
+
// a helper function that gets the src of a script and returns
|
131
|
+
// the content for that script
|
132
|
+
var loadScriptText = function( src ) {
|
133
|
+
var text = "",
|
134
|
+
base = "" + window.location,
|
135
|
+
url = src.match(/([^\?#]*)/)[1];
|
136
|
+
|
137
|
+
if ( url.match(/^\/\//) ) {
|
138
|
+
url = steal.root.join(url.substr(2)); //can steal be removed?
|
139
|
+
}
|
140
|
+
url = Envjs.uri(url, base);
|
141
|
+
|
142
|
+
if ( url.match(/^file\:/) ) {
|
143
|
+
url = url.replace("file:/", "");
|
144
|
+
text = readFile("/" + url);
|
145
|
+
}
|
146
|
+
|
147
|
+
if ( url.match(/^http\:/) ) {
|
148
|
+
text = readUrl(url);
|
149
|
+
}
|
150
|
+
|
151
|
+
return text;
|
152
|
+
};
|
153
|
+
|
154
|
+
// types conversion
|
155
|
+
// the idea is for each type to return JavaScript (or css) that
|
156
|
+
// should be in its place
|
157
|
+
steal.build.types = {
|
158
|
+
'text/javascript': function( script ) {
|
159
|
+
if ( script.src ) {
|
160
|
+
return loadScriptText(script.src, script);
|
161
|
+
}
|
162
|
+
else {
|
163
|
+
return script.text;
|
164
|
+
}
|
165
|
+
},
|
166
|
+
'text/css': function( script ) {
|
167
|
+
if ( script.href ) {
|
168
|
+
return loadScriptText(script.href, script);
|
169
|
+
}
|
170
|
+
else {
|
171
|
+
return script.text;
|
172
|
+
}
|
173
|
+
},
|
174
|
+
'text/ejs': function( script ) {
|
175
|
+
var text = script.text || loadScriptText(script.src),
|
176
|
+
id = script.id || script.getAttribute("id");
|
177
|
+
return jQuery.View.registerScript("ejs", id, text);
|
178
|
+
},
|
179
|
+
'text/micro': function( script ) {
|
180
|
+
var text = script.text || loadScriptText(script.src),
|
181
|
+
id = script.id || script.getAttribute("id");
|
182
|
+
return jQuery.View.registerScript("micro", id, text);
|
183
|
+
},
|
184
|
+
'text/jaml': function( script ) {
|
185
|
+
var text = script.text || loadScriptText(script.src),
|
186
|
+
id = script.id || script.getAttribute("id");
|
187
|
+
return jQuery.View.registerScript("jaml", id, text);
|
188
|
+
},
|
189
|
+
'text/tmpl': function( script ) {
|
190
|
+
var text = script.text || loadScriptText(script.src),
|
191
|
+
id = script.id || script.getAttribute("id");
|
192
|
+
return jQuery.View.registerScript("tmpl", id, text);
|
193
|
+
},
|
194
|
+
loadScriptText: loadScriptText
|
195
|
+
};
|
196
|
+
|
197
|
+
/**
|
198
|
+
* @function open
|
199
|
+
* Opens a page by:
|
200
|
+
* temporarily deleting the rhino steal
|
201
|
+
* opening the page with Envjs
|
202
|
+
* setting back rhino steal, saving envjs's steal as steal._steal;
|
203
|
+
* @param {String} url the html page to open
|
204
|
+
* @return {Object} an object with properties that makes extracting
|
205
|
+
* the content for a certain tag slightly easier.
|
206
|
+
*
|
207
|
+
*/
|
208
|
+
steal.build.open = function( url , stealData ) {
|
209
|
+
var scripts = [],
|
210
|
+
|
211
|
+
// save and remove the old steal
|
212
|
+
oldSteal = window.steal || steal,
|
213
|
+
newSteal;
|
214
|
+
delete window.steal;
|
215
|
+
if(stealData){
|
216
|
+
window.steal = stealData;
|
217
|
+
}
|
218
|
+
// get envjs
|
219
|
+
load('steal/rhino/env.js'); //reload every time
|
220
|
+
|
221
|
+
// open the url
|
222
|
+
Envjs(url, {
|
223
|
+
scriptTypes: {
|
224
|
+
"text/javascript": true,
|
225
|
+
"text/envjs": true
|
226
|
+
},
|
227
|
+
fireLoad: false,
|
228
|
+
logLevel: 2,
|
229
|
+
afterScriptLoad: {
|
230
|
+
".*": function( script ) {
|
231
|
+
scripts.push(script);
|
232
|
+
}
|
233
|
+
},
|
234
|
+
onLoadUnknownTypeScript: function( script ) {
|
235
|
+
scripts.push(script);
|
236
|
+
},
|
237
|
+
afterInlineScriptLoad: function( script ) {
|
238
|
+
scripts.push(script);
|
239
|
+
}
|
240
|
+
});
|
241
|
+
|
242
|
+
// set back steal
|
243
|
+
newSteal = window.steal;
|
244
|
+
window.steal = oldSteal;
|
245
|
+
window.steal._steal = newSteal;
|
246
|
+
|
247
|
+
|
248
|
+
// check if newSteal added any build types (used to convert less to css for example).
|
249
|
+
for ( var buildType in newSteal.build.types ) {
|
250
|
+
oldSteal.build.types[buildType] = newSteal.build.types[buildType];
|
251
|
+
}
|
252
|
+
|
253
|
+
// return the helper
|
254
|
+
return {
|
255
|
+
/**
|
256
|
+
* @hide
|
257
|
+
* Gets all elements of a type, extracts their converted content, and calls a callback function with
|
258
|
+
* each element and its converted content.
|
259
|
+
* @param {Object} [type] the tag to get
|
260
|
+
* @param {Object} func a function to call back with the element and its content
|
261
|
+
*/
|
262
|
+
each: function( type, func ) {
|
263
|
+
if ( typeof type == 'function' ) {
|
264
|
+
func = type;
|
265
|
+
type = 'script';
|
266
|
+
}
|
267
|
+
var scripts = document.getElementsByTagName(type);
|
268
|
+
for ( var i = 0; i < scripts.length; i++ ) {
|
269
|
+
func(scripts[i], this.getScriptContent(scripts[i]), i);
|
270
|
+
}
|
271
|
+
},
|
272
|
+
getScriptContent: function( script ) {
|
273
|
+
return steal.build.types[script.type] && steal.build.types[script.type](script, loadScriptText);
|
274
|
+
},
|
275
|
+
// the
|
276
|
+
steal: newSteal,
|
277
|
+
url: url
|
278
|
+
};
|
279
|
+
};
|
280
|
+
|
281
|
+
});
|
@@ -0,0 +1,73 @@
|
|
1
|
+
// usage:
|
2
|
+
// js steal\scripts\pluginify.js funcunit/functional -destination funcunit/dist/funcunit.js
|
3
|
+
// js steal\scripts\pluginify.js jquery/controller
|
4
|
+
// js steal\scripts\pluginify.js jquery/event/drag -exclude jquery/lang/vector/vector.js jquery/event/livehack/livehack.js
|
5
|
+
// load("steal/rhino/steal.js");
|
6
|
+
|
7
|
+
|
8
|
+
load("steal/rhino/steal.js");
|
9
|
+
steal.plugins('steal/build','steal/build/scripts',function(){
|
10
|
+
|
11
|
+
/**
|
12
|
+
*
|
13
|
+
* @param {Object} plugin
|
14
|
+
* @param {Object} opts
|
15
|
+
*/
|
16
|
+
steal.pluginify = function(plugin, opts){
|
17
|
+
|
18
|
+
var jq = true;
|
19
|
+
opts = steal.opts(opts, {
|
20
|
+
"destination": 1,
|
21
|
+
"exclude": -1,
|
22
|
+
"nojquery": 0,
|
23
|
+
"packagejquery": 0
|
24
|
+
}), destination = opts.destination || plugin + ".js";
|
25
|
+
|
26
|
+
opts.exclude = !opts.exclude ? [] :
|
27
|
+
(steal.isArray(opts.exclude) ? opts.exclude : [opts.exclude]);
|
28
|
+
|
29
|
+
if(opts.nojquery){
|
30
|
+
jq = false
|
31
|
+
}
|
32
|
+
if(!opts.packagejquery){
|
33
|
+
opts.exclude.push('jquery.js')
|
34
|
+
}
|
35
|
+
rhinoLoader = {
|
36
|
+
callback: function(s){
|
37
|
+
s.plugin(plugin)
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
steal.win().build_in_progress = true;
|
42
|
+
|
43
|
+
var pageSteal = steal.build.open("steal/rhino/empty.html").steal,
|
44
|
+
out = [],
|
45
|
+
str,
|
46
|
+
i,
|
47
|
+
inExclude = function(path){
|
48
|
+
for (var i = 0; i < opts.exclude.length; i++) {
|
49
|
+
if (opts.exclude[i].indexOf(path) > -1) {
|
50
|
+
return true
|
51
|
+
}
|
52
|
+
}
|
53
|
+
return false;
|
54
|
+
};
|
55
|
+
|
56
|
+
for (i = 0; i < pageSteal.total.length; i++) {
|
57
|
+
if (typeof pageSteal.total[i].func == "function") {
|
58
|
+
filePath = pageSteal.total[i].path;
|
59
|
+
if (!inExclude(filePath)) {
|
60
|
+
file = readFile(filePath);
|
61
|
+
match = file.match(/\.then\(\s*function\s*\([^\)]*\)\s*\{([\s\S]*)\}\s*\)\s*;*\s*/im)
|
62
|
+
str = "// " + filePath + "\n\n"
|
63
|
+
str += "(function($){\n" + steal.build.builders.scripts.clean(match[1]) + "\n})(" + (jq ? "jQuery" : "") + ");\n\n"
|
64
|
+
out.push(str);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
print("saving to " + destination);
|
69
|
+
new steal.File(destination).save(out.join(""));
|
70
|
+
//print("pluginified " + plugin)
|
71
|
+
}
|
72
|
+
|
73
|
+
})
|
Binary file
|
@@ -0,0 +1,155 @@
|
|
1
|
+
steal(function( steal ) {
|
2
|
+
|
3
|
+
/**
|
4
|
+
* Builds JavaScripts
|
5
|
+
* @param {Object} opener the result of a steal.build.open
|
6
|
+
* @param {Object} options options passed to the build script
|
7
|
+
*/
|
8
|
+
var scripts = (steal.build.builders.scripts = function( opener, options ) {
|
9
|
+
print("\nBUILDING SCRIPTS --------------- ");
|
10
|
+
|
11
|
+
// get the compressor
|
12
|
+
var compressor = scripts.compressors[options.compressor || "localClosure"](),
|
13
|
+
|
14
|
+
// packages that can be compressed somewhere
|
15
|
+
packages = {},
|
16
|
+
|
17
|
+
// the current package
|
18
|
+
currentPackage = [];
|
19
|
+
|
20
|
+
// compress all scripts by default
|
21
|
+
if ( options.all ) {
|
22
|
+
packages['production.js'] = currentPackage;
|
23
|
+
}
|
24
|
+
|
25
|
+
// for each script we find
|
26
|
+
opener.each("script", function( script, text, i ) {
|
27
|
+
|
28
|
+
// if we should ignore it, ignore it
|
29
|
+
if ( script.getAttribute('ignore') == "true" ) {
|
30
|
+
if ( script.src ) {
|
31
|
+
print(' ignoring ' + script.src);
|
32
|
+
}
|
33
|
+
return;
|
34
|
+
}
|
35
|
+
|
36
|
+
// if it has a src, let people know we are compressing it
|
37
|
+
if ( script.src ) {
|
38
|
+
print(" " + script.src.replace(/\?.*$/, "").replace(/^(\.\.\/)+/, ""));
|
39
|
+
}
|
40
|
+
|
41
|
+
// get the package, this will be production.js
|
42
|
+
var pack = script.getAttribute('package');
|
43
|
+
|
44
|
+
|
45
|
+
if ( pack ) {
|
46
|
+
//if we don't have it, create it and set it to the current package
|
47
|
+
if (!packages[pack] ) {
|
48
|
+
packages[pack] = [];
|
49
|
+
}
|
50
|
+
currentPackage = packages[pack];
|
51
|
+
}
|
52
|
+
|
53
|
+
// clean out any remove-start style comments
|
54
|
+
text = scripts.clean(text);
|
55
|
+
|
56
|
+
// if we should compress the script, compress it
|
57
|
+
if ( script.getAttribute('compress') == "true" || options.all ) {
|
58
|
+
text = compressor(text, true);
|
59
|
+
}
|
60
|
+
|
61
|
+
// put the result in the package
|
62
|
+
currentPackage.push(text);
|
63
|
+
});
|
64
|
+
|
65
|
+
print("");
|
66
|
+
|
67
|
+
// go through all the packages
|
68
|
+
for ( var p in packages ) {
|
69
|
+
if ( packages[p].length ) {
|
70
|
+
//join them
|
71
|
+
var compressed = packages[p].join(";\n");
|
72
|
+
//save them
|
73
|
+
new steal.File(options.to + p).save(compressed);
|
74
|
+
print("SCRIPT BUNDLE > " + options.to + p);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
});
|
78
|
+
// removes dev comments from text
|
79
|
+
scripts.clean = function( text ) {
|
80
|
+
return String(java.lang.String(text).replaceAll("(?s)\/\/@steal-remove-start(.*?)\/\/@steal-remove-end", "").replaceAll("steal[\n\s\r]*\.[\n\s\r]*dev[\n\s\r]*\.[\n\s\r]*(\\w+)[\n\s\r]*\\([^\\)]*\\)", ""));
|
81
|
+
};
|
82
|
+
|
83
|
+
//various compressors
|
84
|
+
scripts.compressors = {
|
85
|
+
// needs shrinksafe.jar at steal/build/javascripts/shrinksafe.jar
|
86
|
+
shrinksafe: function() {
|
87
|
+
print("steal.compress - Using ShrinkSafe");
|
88
|
+
// importPackages/Class doesn't really work
|
89
|
+
var URLClassLoader = Packages.java.net.URLClassLoader,
|
90
|
+
URL = java.net.URL,
|
91
|
+
File = java.io.File,
|
92
|
+
ss = new File("steal/build/javascripts/shrinksafe.jar"),
|
93
|
+
ssurl = ss.toURL(),
|
94
|
+
urls = java.lang.reflect.Array.newInstance(URL, 1);
|
95
|
+
urls[0] = new URL(ssurl);
|
96
|
+
|
97
|
+
var clazzLoader = new URLClassLoader(urls),
|
98
|
+
mthds = clazzLoader.loadClass("org.dojotoolkit.shrinksafe.Compressor").getDeclaredMethods(),
|
99
|
+
rawCompress = null;
|
100
|
+
|
101
|
+
//iterate through methods to find the one we are looking for
|
102
|
+
for ( var i = 0; i < mthds.length; i++ ) {
|
103
|
+
var meth = mthds[i];
|
104
|
+
if ( meth.toString().match(/compressScript\(java.lang.String,int,int,boolean\)/) ) {
|
105
|
+
rawCompress = meth;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
return function( src ) {
|
109
|
+
var zero = new java.lang.Integer(0),
|
110
|
+
one = new java.lang.Integer(1),
|
111
|
+
tru = new java.lang.Boolean(false),
|
112
|
+
script = new java.lang.String(src);
|
113
|
+
return rawCompress.invoke(null, script, zero, one, tru);
|
114
|
+
};
|
115
|
+
},
|
116
|
+
closureService: function() {
|
117
|
+
print("steal.compress - Using Google Closure Service");
|
118
|
+
|
119
|
+
return function( src ) {
|
120
|
+
var xhr = new XMLHttpRequest();
|
121
|
+
xhr.open("POST", "http://closure-compiler.appspot.com/compile", false);
|
122
|
+
xhr.setRequestHeader["Content-Type"] = "application/x-www-form-urlencoded";
|
123
|
+
var params = "js_code=" + encodeURIComponent(src) + "&compilation_level=WHITESPACE_ONLY" + "&output_format=text&output_info=compiled_code";
|
124
|
+
xhr.send(params);
|
125
|
+
return "" + xhr.responseText;
|
126
|
+
};
|
127
|
+
},
|
128
|
+
localClosure: function() {
|
129
|
+
//was unable to use SS import method, so create a temp file
|
130
|
+
print("steal.compress - Using Google Closure app");
|
131
|
+
return function( src, quiet ) {
|
132
|
+
var rnd = Math.floor(Math.random() * 1000000 + 1),
|
133
|
+
filename = "tmp" + rnd + ".js",
|
134
|
+
tmpFile = new steal.File(filename);
|
135
|
+
|
136
|
+
tmpFile.save(src);
|
137
|
+
|
138
|
+
var outBaos = new java.io.ByteArrayOutputStream(),
|
139
|
+
output = new java.io.PrintStream(outBaos);
|
140
|
+
if ( quiet ) {
|
141
|
+
runCommand("java", "-jar", "steal/build/scripts/compiler.jar", "--compilation_level", "SIMPLE_OPTIMIZATIONS", "--warning_level", "QUIET", "--js", filename, {
|
142
|
+
output: output
|
143
|
+
});
|
144
|
+
} else {
|
145
|
+
runCommand("java", "-jar", "steal/build/scripts/compiler.jar", "--compilation_level", "SIMPLE_OPTIMIZATIONS", "--js", filename, {
|
146
|
+
output: output
|
147
|
+
});
|
148
|
+
}
|
149
|
+
tmpFile.remove();
|
150
|
+
|
151
|
+
return outBaos.toString();
|
152
|
+
};
|
153
|
+
}
|
154
|
+
};
|
155
|
+
});
|