jazz-jss 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +44 -19
- data/bin/jazz +20 -8
- data/lib/jazz/cli.rb +73 -9
- data/lib/jazz/generators/controller/controller.rb +22 -0
- data/lib/jazz/generators/controller/templates/controller.js +38 -0
- data/lib/jazz/generators/helper/helper.rb +22 -0
- data/lib/jazz/generators/helper/templates/helper.js +6 -0
- data/lib/jazz/generators/model/model.rb +50 -0
- data/lib/jazz/generators/model/templates/database.js +14 -0
- data/lib/jazz/generators/model/templates/fixture.js +10 -0
- data/{templates → lib/jazz/generators/model/templates}/model.js +9 -12
- data/lib/jazz/generators/project/project.rb +27 -0
- data/{templates/app_root/development/app/assets/javascripts/application.js → lib/jazz/generators/project/templates/app_root/JEMFILE.js} +0 -0
- data/{templates/app_root/development/app/assets/stylesheets/application.css → lib/jazz/generators/project/templates/app_root/app/assets/javascripts/application.js} +0 -0
- data/{templates/view_create.html → lib/jazz/generators/project/templates/app_root/app/assets/stylesheets/application.sass} +0 -0
- data/lib/jazz/generators/project/templates/app_root/app/controllers/application_controller.js +9 -0
- data/{templates/app_root/development → lib/jazz/generators/project/templates/app_root}/app/helpers/application_helper.js +0 -1
- data/lib/jazz/generators/project/templates/app_root/app/scenarios/application_scenario.js +13 -0
- data/lib/jazz/generators/project/templates/app_root/app/views/layouts/index.handlebars +1 -0
- data/lib/jazz/generators/project/templates/app_root/config/boot.js +23 -0
- data/lib/jazz/generators/project/templates/app_root/config/routes.js +6 -0
- data/{templates/view_index.html → lib/jazz/generators/project/templates/app_root/db/fixtures/touch} +0 -0
- data/lib/jazz/generators/project/templates/app_root/index.html +11 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/_.js +9 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/controller/_.js +1 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/controller/controller.js +22 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/core/_.js +1 -0
- data/{dist/jazz/lib → lib/jazz/generators/project/templates/app_root/lib/jazz/lib/core}/core.js +0 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/database/_.js +3 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/database/database.js +10 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/database/finder.js +41 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/database/modifier.js +10 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/helper/_.js +2 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/helper/helper.js +49 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/helper/underscore.js +13 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/_.js +4 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/conditional.js +3 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/finder.js +21 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/model.js +23 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/model/modifier.js +44 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/route/_.js +1 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/route/route.js +115 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/scenario/_.js +2 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/scenario/initialize_scenarios/application.js +3 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/scenario/scenario.js +13 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/view/_.js +1 -0
- data/lib/jazz/generators/project/templates/app_root/lib/jazz/lib/view/view.js +39 -0
- data/{dist/handlebars → lib/jazz/generators/project/templates/app_root/vendor}/handlebars.js +0 -0
- data/{dist/hashchange → lib/jazz/generators/project/templates/app_root/vendor}/hashchange.js +0 -0
- data/{dist/jquery → lib/jazz/generators/project/templates/app_root/vendor}/jquery.js +0 -0
- data/lib/jazz/generators/project/templates/app_root/vendor/simplemodal.js +698 -0
- data/lib/jazz/generators/project/templates/app_root/vendor/tipTip.js +191 -0
- data/{dist/underscore → lib/jazz/generators/project/templates/app_root/vendor}/underscore.js +0 -0
- data/lib/jazz/generators/project/templates/application.js +12 -0
- data/lib/jazz/generators/scaffold/scaffold.rb +73 -0
- data/lib/jazz/generators/scaffold/templates/controller.js +49 -0
- data/lib/jazz/generators/scaffold/templates/database.js +14 -0
- data/lib/jazz/generators/scaffold/templates/fixture.js +10 -0
- data/lib/jazz/generators/scaffold/templates/helper.js +6 -0
- data/lib/jazz/generators/scaffold/templates/model.js +13 -0
- data/lib/jazz/generators/scaffold/templates/scenario.js +7 -0
- data/lib/jazz/generators/scaffold/templates/view_edit.handlebars +6 -0
- data/lib/jazz/generators/scaffold/templates/view_form.handlebars +12 -0
- data/lib/jazz/generators/scaffold/templates/view_index.handlebars +27 -0
- data/lib/jazz/generators/scaffold/templates/view_new.handlebars +5 -0
- data/lib/jazz/generators/scaffold/templates/view_show.handlebars +10 -0
- data/lib/jazz/generators/scenario/scenario.rb +22 -0
- data/lib/jazz/generators/scenario/templates/scenario.js +7 -0
- data/lib/jazz/rack/config.ru +16 -0
- data/lib/jazz/sprockets/templates/handlebars.rb +30 -0
- metadata +120 -234
- data/dist/jazz/lib/controller.js +0 -17
- data/dist/jazz/lib/db.js +0 -41
- data/dist/jazz/lib/helper.js +0 -38
- data/dist/jazz/lib/model.js +0 -95
- data/dist/jazz/lib/route.js +0 -74
- data/dist/jazz/lib/view.js +0 -1
- data/dist/jazz/module.js +0 -15
- data/dist/require/order.js +0 -180
- data/dist/require/require.js +0 -31
- data/dist/require/template.js +0 -98
- data/lib/jazz.rb +0 -12
- data/lib/jazz/app_detector.rb +0 -70
- data/lib/jazz/app_generator.rb +0 -41
- data/lib/jazz/controller_generator.rb +0 -34
- data/lib/jazz/helper_generator.rb +0 -30
- data/lib/jazz/model_generator.rb +0 -27
- data/lib/jazz/scaffold_generator.rb +0 -49
- data/templates/app_root/Rakefile +0 -11
- data/templates/app_root/development/app/controllers/application_controller.js +0 -11
- data/templates/app_root/development/config/glue.js +0 -9
- data/templates/app_root/development/config/routes.js +0 -5
- data/templates/app_root/scripts/build.js +0 -30
- data/templates/app_root/scripts/r.js/LICENSE +0 -58
- data/templates/app_root/scripts/r.js/README.md +0 -177
- data/templates/app_root/scripts/r.js/build/build.js +0 -26
- data/templates/app_root/scripts/r.js/build/buildebug.sh +0 -4
- data/templates/app_root/scripts/r.js/build/example.build.js +0 -296
- data/templates/app_root/scripts/r.js/build/jslib/blank.js +0 -4
- data/templates/app_root/scripts/r.js/build/jslib/build.js +0 -952
- data/templates/app_root/scripts/r.js/build/jslib/commandLine.js +0 -23
- data/templates/app_root/scripts/r.js/build/jslib/commonJs.js +0 -152
- data/templates/app_root/scripts/r.js/build/jslib/env.js +0 -47
- data/templates/app_root/scripts/r.js/build/jslib/lang.js +0 -49
- data/templates/app_root/scripts/r.js/build/jslib/logger.js +0 -58
- data/templates/app_root/scripts/r.js/build/jslib/node.js +0 -106
- data/templates/app_root/scripts/r.js/build/jslib/node/args.js +0 -20
- data/templates/app_root/scripts/r.js/build/jslib/node/file.js +0 -263
- data/templates/app_root/scripts/r.js/build/jslib/node/load.js +0 -17
- data/templates/app_root/scripts/r.js/build/jslib/node/optimize.js +0 -10
- data/templates/app_root/scripts/r.js/build/jslib/node/print.js +0 -16
- data/templates/app_root/scripts/r.js/build/jslib/optimize.js +0 -279
- data/templates/app_root/scripts/r.js/build/jslib/opto.build.js +0 -11
- data/templates/app_root/scripts/r.js/build/jslib/parse.js +0 -590
- data/templates/app_root/scripts/r.js/build/jslib/pragma.js +0 -251
- data/templates/app_root/scripts/r.js/build/jslib/requirePatch.js +0 -286
- data/templates/app_root/scripts/r.js/build/jslib/rhino.js +0 -22
- data/templates/app_root/scripts/r.js/build/jslib/rhino/args.js +0 -21
- data/templates/app_root/scripts/r.js/build/jslib/rhino/file.js +0 -244
- data/templates/app_root/scripts/r.js/build/jslib/rhino/load.js +0 -12
- data/templates/app_root/scripts/r.js/build/jslib/rhino/optimize.js +0 -100
- data/templates/app_root/scripts/r.js/build/jslib/rhino/print.js +0 -12
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/README.md +0 -16
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/index.js +0 -21
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/parse-js.js +0 -1342
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/process.js +0 -2005
- data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/squeeze-more.js +0 -55
- data/templates/app_root/scripts/r.js/build/jslib/x.js +0 -243
- data/templates/app_root/scripts/r.js/build/tests/all.js +0 -47
- data/templates/app_root/scripts/r.js/build/tests/allj.sh +0 -3
- data/templates/app_root/scripts/r.js/build/tests/alln.sh +0 -18
- data/templates/app_root/scripts/r.js/build/tests/anonSimple.build.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/buildUtils.js +0 -19
- data/templates/app_root/scripts/r.js/build/tests/builds.js +0 -489
- data/templates/app_root/scripts/r.js/build/tests/circular.build.js +0 -18
- data/templates/app_root/scripts/r.js/build/tests/convert.js +0 -18
- data/templates/app_root/scripts/r.js/build/tests/css.build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/css/common/common.css +0 -4
- data/templates/app_root/scripts/r.js/build/tests/css/master.css +0 -10
- data/templates/app_root/scripts/r.js/build/tests/css/sub/sub1.css +0 -7
- data/templates/app_root/scripts/r.js/build/tests/cssTestCompare.css +0 -13
- data/templates/app_root/scripts/r.js/build/tests/end.frag +0 -3
- data/templates/app_root/scripts/r.js/build/tests/expected/unoExcludeShallow.js +0 -23
- data/templates/app_root/scripts/r.js/build/tests/exports.build.js +0 -12
- data/templates/app_root/scripts/r.js/build/tests/hasTestModule.build.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/hasTestModule.js +0 -30
- data/templates/app_root/scripts/r.js/build/tests/http/httpBuild.js +0 -70
- data/templates/app_root/scripts/r.js/build/tests/http/main.html +0 -28
- data/templates/app_root/scripts/r.js/build/tests/http/scripts/main.js +0 -18
- data/templates/app_root/scripts/r.js/build/tests/http/scripts/one.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/http/scripts/three.js +0 -5
- data/templates/app_root/scripts/r.js/build/tests/http/scripts/two.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/i18n.build.js +0 -17
- data/templates/app_root/scripts/r.js/build/tests/indexBuilder.build.js +0 -8
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/a.js +0 -17
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/b.js +0 -8
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/c.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/d.js +0 -5
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/expected.js +0 -36
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/node_modules/amdefine/LICENSE +0 -58
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/node_modules/amdefine/amdefine.js +0 -188
- data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/node_modules/amdefine/package.json +0 -21
- data/templates/app_root/scripts/r.js/build/tests/lib/comments/bang.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/lib/comments/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/comments/expected.js +0 -9
- data/templates/app_root/scripts/r.js/build/tests/lib/comments/license.js +0 -13
- data/templates/app_root/scripts/r.js/build/tests/lib/dotpackage/scripts/app.build.js +0 -15
- data/templates/app_root/scripts/r.js/build/tests/lib/dotpackage/scripts/main-expected.js +0 -13
- data/templates/app_root/scripts/r.js/build/tests/lib/dotpackage/scripts/main.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/build.js +0 -13
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/expected.js +0 -8
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/main.js +0 -1
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/sub1.js +0 -1
- data/templates/app_root/scripts/r.js/build/tests/lib/empty/sub2.js +0 -1
- data/templates/app_root/scripts/r.js/build/tests/lib/nameInsertion/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/nameInsertion/expected.js +0 -12
- data/templates/app_root/scripts/r.js/build/tests/lib/nameInsertion/main.js +0 -9
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/build.js +0 -8
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/expected.js +0 -47
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/main.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/four.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/one.js +0 -9
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/three.js +0 -14
- data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/two.js +0 -5
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/a.js +0 -12
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/b.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/buildWithCE.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/c.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/d.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/e.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/expected-built.js +0 -36
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/expected-builtWithCE.js +0 -42
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/main.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nested/top.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/a.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/b.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedAll.js +0 -9
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedB.js +0 -11
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedC.js +0 -11
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedD.js +0 -11
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNested.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/c.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/d.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-built.js +0 -21
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedAll.js +0 -31
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedB.js +0 -24
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedC.js +0 -24
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedD.js +0 -25
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNested.js +0 -31
- data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/main.js +0 -17
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/build.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/converter.js +0 -11
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/main.js +0 -6
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/plug.js +0 -29
- data/templates/app_root/scripts/r.js/build/tests/lib/plugins/util.js +0 -7
- data/templates/app_root/scripts/r.js/build/tests/nameOnly.build.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/nodeAll.js +0 -3
- data/templates/app_root/scripts/r.js/build/tests/nodeOptimize.js +0 -12
- data/templates/app_root/scripts/r.js/build/tests/nodeOptimizeNoCallback.js +0 -10
- data/templates/app_root/scripts/r.js/build/tests/order.build.js +0 -16
- data/templates/app_root/scripts/r.js/build/tests/override/override.js +0 -36
- data/templates/app_root/scripts/r.js/build/tests/packages.build.js +0 -59
- data/templates/app_root/scripts/r.js/build/tests/parse.js +0 -103
- data/templates/app_root/scripts/r.js/build/tests/simple.build.js +0 -13
- data/templates/app_root/scripts/r.js/build/tests/simpleNamespace.build.js +0 -17
- data/templates/app_root/scripts/r.js/build/tests/start.frag +0 -4
- data/templates/app_root/scripts/r.js/build/tests/text.build.js +0 -16
- data/templates/app_root/scripts/r.js/build/tests/textExclude.build.js +0 -16
- data/templates/app_root/scripts/r.js/dist.js +0 -95
- data/templates/app_root/scripts/r.js/dist/README.md +0 -6
- data/templates/app_root/scripts/r.js/dist/r-1.0.0.js +0 -9042
- data/templates/app_root/scripts/r.js/dist/r-edge.js +0 -9191
- data/templates/app_root/scripts/r.js/dist/r.js +0 -9099
- data/templates/app_root/scripts/r.js/lib/closure/COPYING +0 -202
- data/templates/app_root/scripts/r.js/lib/closure/README +0 -292
- data/templates/app_root/scripts/r.js/lib/closure/compiler.jar +0 -0
- data/templates/app_root/scripts/r.js/lib/rhino/LICENSE +0 -4
- data/templates/app_root/scripts/r.js/lib/rhino/js.jar +0 -0
- data/templates/app_root/scripts/r.js/require.js +0 -1952
- data/templates/app_root/scripts/r.js/tasks.txt +0 -2
- data/templates/app_root/scripts/r.js/tests/all.js +0 -49
- data/templates/app_root/scripts/r.js/tests/allNode.js +0 -3
- data/templates/app_root/scripts/r.js/tests/allj.sh +0 -1
- data/templates/app_root/scripts/r.js/tests/alln.sh +0 -2
- data/templates/app_root/scripts/r.js/tests/alpha.js +0 -3
- data/templates/app_root/scripts/r.js/tests/beta.js +0 -6
- data/templates/app_root/scripts/r.js/tests/doh/LICENSE +0 -195
- data/templates/app_root/scripts/r.js/tests/doh/README +0 -12
- data/templates/app_root/scripts/r.js/tests/doh/_browserRunner.js +0 -855
- data/templates/app_root/scripts/r.js/tests/doh/_nodeRunner.js +0 -20
- data/templates/app_root/scripts/r.js/tests/doh/_rhinoRunner.js +0 -17
- data/templates/app_root/scripts/r.js/tests/doh/_sounds/LICENSE +0 -10
- data/templates/app_root/scripts/r.js/tests/doh/_sounds/doh.wav +0 -0
- data/templates/app_root/scripts/r.js/tests/doh/_sounds/dohaaa.wav +0 -0
- data/templates/app_root/scripts/r.js/tests/doh/_sounds/woohoo.wav +0 -0
- data/templates/app_root/scripts/r.js/tests/doh/runner.html +0 -316
- data/templates/app_root/scripts/r.js/tests/doh/runner.js +0 -1499
- data/templates/app_root/scripts/r.js/tests/doh/runner.sh +0 -3
- data/templates/app_root/scripts/r.js/tests/doh/small_logo.png +0 -0
- data/templates/app_root/scripts/r.js/tests/node/canvasTest.js +0 -39
- data/templates/app_root/scripts/r.js/tests/node/embedded/README.md +0 -15
- data/templates/app_root/scripts/r.js/tests/node/embedded/coffee/foo.coffee +0 -1
- data/templates/app_root/scripts/r.js/tests/node/embedded/main.js +0 -13
- data/templates/app_root/scripts/r.js/tests/node/embedded/scripts/bar.js +0 -13
- data/templates/app_root/scripts/r.js/tests/node/index.js +0 -11
- data/templates/app_root/scripts/r.js/tests/node/tests/alpha/foo.js +0 -6
- data/templates/app_root/scripts/r.js/tests/node/tests/alpha/hello.html +0 -9
- data/templates/app_root/scripts/r.js/tests/node/tests/foo.js +0 -3
- data/templates/app_root/scripts/r.js/tests/node/tests/server.js +0 -11
- data/templates/app_root/scripts/r.js/tests/relative.js +0 -10
- data/templates/app_root/scripts/r.js/tests/sub/betaSub.js +0 -3
- data/templates/application.js +0 -7
- data/templates/boot.js +0 -42
- data/templates/controller.js +0 -19
- data/templates/db.js +0 -14
- data/templates/helper.js +0 -9
- data/templates/index.html +0 -9
- data/templates/scaffold_controller.js +0 -19
- data/templates/view_show.html +0 -0
- data/templates/view_update.html +0 -0
@@ -1,30 +0,0 @@
|
|
1
|
-
({
|
2
|
-
paths: {
|
3
|
-
order: 'vendor/require/order',
|
4
|
-
jquery: 'vendor/jquery/',
|
5
|
-
underscore: 'vendor/underscore/',
|
6
|
-
handlebars: 'vendor/handlebars/',
|
7
|
-
haschange: 'vendor/hashchange/',
|
8
|
-
|
9
|
-
jazz: 'lib/jazz/',
|
10
|
-
|
11
|
-
helpers: 'app/helpers/',
|
12
|
-
controllers: 'app/controllers/',
|
13
|
-
models: 'app/models/',
|
14
|
-
views: 'app/views/'
|
15
|
-
},
|
16
|
-
|
17
|
-
appDir: "../development/",
|
18
|
-
|
19
|
-
baseUrl: "./",
|
20
|
-
|
21
|
-
dir: "../release",
|
22
|
-
|
23
|
-
optimize: "uglify",
|
24
|
-
|
25
|
-
modules: [
|
26
|
-
{
|
27
|
-
name: "config/boot"
|
28
|
-
}
|
29
|
-
]
|
30
|
-
})
|
@@ -1,58 +0,0 @@
|
|
1
|
-
RequireJS r.js is released under two licenses: new BSD, and MIT. You may pick the
|
2
|
-
license that best suits your development needs. The text of both licenses are
|
3
|
-
provided below.
|
4
|
-
|
5
|
-
|
6
|
-
The "New" BSD License:
|
7
|
-
----------------------
|
8
|
-
|
9
|
-
Copyright (c) 2010-2011, The Dojo Foundation
|
10
|
-
All rights reserved.
|
11
|
-
|
12
|
-
Redistribution and use in source and binary forms, with or without
|
13
|
-
modification, are permitted provided that the following conditions are met:
|
14
|
-
|
15
|
-
* Redistributions of source code must retain the above copyright notice, this
|
16
|
-
list of conditions and the following disclaimer.
|
17
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
18
|
-
this list of conditions and the following disclaimer in the documentation
|
19
|
-
and/or other materials provided with the distribution.
|
20
|
-
* Neither the name of the Dojo Foundation nor the names of its contributors
|
21
|
-
may be used to endorse or promote products derived from this software
|
22
|
-
without specific prior written permission.
|
23
|
-
|
24
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
25
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
26
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
27
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
28
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
29
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
30
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
31
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
32
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
33
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
MIT License
|
38
|
-
-----------
|
39
|
-
|
40
|
-
Copyright (c) 2010-2011, The Dojo Foundation
|
41
|
-
|
42
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
43
|
-
of this software and associated documentation files (the "Software"), to deal
|
44
|
-
in the Software without restriction, including without limitation the rights
|
45
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
46
|
-
copies of the Software, and to permit persons to whom the Software is
|
47
|
-
furnished to do so, subject to the following conditions:
|
48
|
-
|
49
|
-
The above copyright notice and this permission notice shall be included in
|
50
|
-
all copies or substantial portions of the Software.
|
51
|
-
|
52
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
53
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
54
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
55
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
56
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
57
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
58
|
-
THE SOFTWARE.
|
@@ -1,177 +0,0 @@
|
|
1
|
-
# r.js
|
2
|
-
|
3
|
-
A command line tool for running JavaScript scripts that use the
|
4
|
-
[Asychronous Module Defintion API (AMD)](http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition)
|
5
|
-
for declaring and using JavaScript modules and regular JavaScript script files.
|
6
|
-
|
7
|
-
It is part of the [RequireJS project](http://requirejs.org), and works will with
|
8
|
-
the RequireJS implementation of AMD.
|
9
|
-
|
10
|
-
r.js is a single script that has two major functions:
|
11
|
-
|
12
|
-
* Run AMD-based projects in Node and Rhino.
|
13
|
-
* Includes the RequireJS Optimizer that combines scripts for optimal browser
|
14
|
-
delivery.
|
15
|
-
|
16
|
-
Releases of r.js are kept in the **dist** directory. To build your own from
|
17
|
-
the files in this repo, run:
|
18
|
-
|
19
|
-
node dist.js
|
20
|
-
|
21
|
-
That will generate an r.js file in the same directory as dist.js
|
22
|
-
|
23
|
-
|
24
|
-
# Running AMD-based projects
|
25
|
-
|
26
|
-
If your JS project's main application file is called main.js, then do
|
27
|
-
the following:
|
28
|
-
|
29
|
-
## Node
|
30
|
-
|
31
|
-
node path/to/r.js main.js
|
32
|
-
|
33
|
-
Requires Node 0.4 or later.
|
34
|
-
|
35
|
-
r.js allows using Node modules installed via npm. For more info see the
|
36
|
-
[Use with Node](http://requirejs.org/docs/node.html) docs.
|
37
|
-
|
38
|
-
## Java
|
39
|
-
|
40
|
-
Java requires some JAR files in the CLASSPATH for it to work:
|
41
|
-
|
42
|
-
* [rhino.jar](https://github.com/jrburke/r.js/blob/master/lib/rhino/js.jar?raw=true) from the [Rhino project](http://www.mozilla.org/rhino/).
|
43
|
-
* [compiler.jar](https://github.com/jrburke/r.js/blob/master/lib/closure/compiler.jar?raw=true) if you are using the optimizer and want to use
|
44
|
-
[Closure Compiler](http://code.google.com/closure/compiler/).
|
45
|
-
|
46
|
-
Download those files to your machine. To run r.js, you can use this type of
|
47
|
-
command:
|
48
|
-
|
49
|
-
### OS X/Linux/Unix:
|
50
|
-
|
51
|
-
java -classpath path/to/rhino/js.jar:path/to/closure/compiler.jar org.mozilla.javascript.tools.shell.Main r.js main.js
|
52
|
-
|
53
|
-
### Windows
|
54
|
-
|
55
|
-
java -classpath path/to/rhino/js.jar;path/to/closure/compiler.jar org.mozilla.javascript.tools.shell.Main r.js main.js
|
56
|
-
|
57
|
-
If you want to run it in the debugger, replace
|
58
|
-
org.mozilla.javascript.tools.shell.Main with
|
59
|
-
**org.mozilla.javascript.tools.debugger.Main**.
|
60
|
-
|
61
|
-
All further examples will use the Node notation, but substitute **node r.js** in the commands with the appropriate java command.
|
62
|
-
|
63
|
-
# Optimizer
|
64
|
-
|
65
|
-
The optimizer can be run by passing the **-o** command to r.js:
|
66
|
-
|
67
|
-
node r.js -o path/to/buildconfig.js
|
68
|
-
|
69
|
-
See the [Optimization doc](http://requirejs.org/docs/optimization.html) for more
|
70
|
-
information on the optimizer.
|
71
|
-
|
72
|
-
If running in **Java**, be sure to grab the Rhino and Closure Compiler jar files in the lib/ directory, then run this command:
|
73
|
-
|
74
|
-
### OS X/Linux/Unix:
|
75
|
-
|
76
|
-
java -classpath path/to/rhino/js.jar:path/to/closure/compiler.jar org.mozilla.javascript.tools.shell.Main r.js -o path/to/buildconfig.js
|
77
|
-
|
78
|
-
### Windows
|
79
|
-
|
80
|
-
java -classpath path/to/rhino/js.jar;path/to/closure/compiler.jar org.mozilla.javascript.tools.shell.Main r.js -o path/to/buildconfig.js
|
81
|
-
|
82
|
-
|
83
|
-
## What makes it special
|
84
|
-
|
85
|
-
The optimizer is better than using a plain concatenation script because it runs
|
86
|
-
require.js as part of the optimization, so it knows how to:
|
87
|
-
|
88
|
-
* Use [Loader Plugins](http://requirejs.org/docs/plugins.html) to load non-script
|
89
|
-
dependencies and inline them in built files.
|
90
|
-
* [Name anonymous modules](http://requirejs.org/docs/api.html#modulename).
|
91
|
-
If your optimization step does not do this, and you use anonymous modules, you
|
92
|
-
will get errors running the built code.
|
93
|
-
|
94
|
-
# Other r.js commands
|
95
|
-
|
96
|
-
## Get Version
|
97
|
-
|
98
|
-
To get the version of r.js and the version of require.js used by r.js:
|
99
|
-
|
100
|
-
node r.js -v
|
101
|
-
|
102
|
-
## Convert CommonJS modules
|
103
|
-
|
104
|
-
To convert a directory of CommonJS modules to ones that have define() wrappers:
|
105
|
-
|
106
|
-
node r.js -convert path/to/commonjs/dir output/dir
|
107
|
-
|
108
|
-
Most, but not all, CommonJS modules can be converted to define()-wrapped modules
|
109
|
-
and still work.
|
110
|
-
|
111
|
-
However, there are some modules that may fail if:
|
112
|
-
|
113
|
-
* They use code branches like if/else or try/catch to call require(). There are
|
114
|
-
problems supporting this kind of dynamic module calls in an async environment.
|
115
|
-
* Some kinds of circular dependencies will not work right. The kinds that fail
|
116
|
-
are normally very brittle and depend on the execution order of the dependent
|
117
|
-
modules.
|
118
|
-
|
119
|
-
# Directory layout
|
120
|
-
|
121
|
-
**NOTE**: If you clone this repository, it **must** be a sibling to a clone of the
|
122
|
-
[RequireJS repository](https://github.com/jrburke/requirejs), where that
|
123
|
-
repository is called **requirejs**. Otherwise the tests will not run.
|
124
|
-
|
125
|
-
* **dist.js**: the script that builds r.js
|
126
|
-
* **require.js**: the version of require.js to include in r.js
|
127
|
-
* **dist** the directory containing releases of r.js
|
128
|
-
* **build**: The files that make up the optimizer. dist.js includes a list of
|
129
|
-
the files from this directory to build into r.js.
|
130
|
-
* **lib**: The Java libraries for Rhino and Closure Compiler. Only needed if using
|
131
|
-
Java/Rhino to run r.js
|
132
|
-
* **tests**: command line tests. Run it under Node and Rhino by doing ../r.js all.js
|
133
|
-
|
134
|
-
dist.js takes the build/jslib/x.js file and injects the require.js files and other
|
135
|
-
files from the build/jslib directory into it.
|
136
|
-
|
137
|
-
If you make changes to any of those files, you will need to run **node dist.js**
|
138
|
-
to generate a new r.js. Be sure to run it through the tests , using both Node
|
139
|
-
and Java/Rhino:
|
140
|
-
|
141
|
-
* node dist.js
|
142
|
-
* cd tests
|
143
|
-
* node ../r.js all.js
|
144
|
-
* java -classpath ../lib/rhino/js.jar:../lib/closure/compiler.jar org.mozilla.javascript.tools.shell.Main ./r.js all.js
|
145
|
-
* cd ../build/tests
|
146
|
-
* node ../../r.js all.js
|
147
|
-
* java -classpath ../../lib/rhino/js.jar:../../lib/closure/compiler.jar org.mozilla.javascript.tools.shell.Main ../../r.js all.js
|
148
|
-
|
149
|
-
# Contributing code changes
|
150
|
-
|
151
|
-
See the [RequireJS Contributing](http://requirejs.org/docs/contributing.html)
|
152
|
-
page for info on how to contribute code/bug fixes to this project.
|
153
|
-
|
154
|
-
Use GitHub pull requests to point to code changes, although for larger changes,
|
155
|
-
contact the [requirejs mailing list](http://groups.google.com/group/requirejs)
|
156
|
-
to discuss them first.
|
157
|
-
|
158
|
-
# Doing a release
|
159
|
-
|
160
|
-
To do a release of version 0.0.0:
|
161
|
-
|
162
|
-
* git checkout -b 0.0.0
|
163
|
-
* Make sure the right version of require.js is in the project.
|
164
|
-
* Modify build/jslib/x.js to update the r.js version number in two places.
|
165
|
-
* node dist.js
|
166
|
-
* Run the tests (see above). They should pass. :)
|
167
|
-
* mv r.js dist/r-0.0.0.js
|
168
|
-
* git add dist/r-0.0.0.js
|
169
|
-
* git commit -a -m "Release 0.0.0"
|
170
|
-
* git tag -am "Release 0.0.0" 0.0.0
|
171
|
-
* git checkout master
|
172
|
-
* git merge 0.0.0
|
173
|
-
* git push origin master
|
174
|
-
* git push --tags
|
175
|
-
* git branch -d 0.0.0
|
176
|
-
|
177
|
-
Update the RequireJS download site to point to the latest release.
|
@@ -1,26 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
|
3
|
-
* Available via the MIT or new BSD license.
|
4
|
-
* see: http://github.com/jrburke/requirejs for details
|
5
|
-
*/
|
6
|
-
|
7
|
-
/*
|
8
|
-
* Create a build.js file that has the build options you want and pass that
|
9
|
-
* build file to this file to do the build. See example.build.js for more information.
|
10
|
-
*/
|
11
|
-
|
12
|
-
/*jslint strict: false, nomen: false */
|
13
|
-
/*global require: false */
|
14
|
-
|
15
|
-
require({
|
16
|
-
baseUrl: require.s.contexts._.config.baseUrl,
|
17
|
-
//Use a separate context than the default context so that the
|
18
|
-
//build can use the default context.
|
19
|
-
context: 'build',
|
20
|
-
catchError: {
|
21
|
-
define: true
|
22
|
-
}
|
23
|
-
}, ['env!env/args', 'build'],
|
24
|
-
function (args, build) {
|
25
|
-
build(args);
|
26
|
-
});
|
@@ -1,296 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is an example build file that demonstrates how to use the build system for
|
3
|
-
* require.js.
|
4
|
-
*
|
5
|
-
* THIS BUILD FILE WILL NOT WORK. It is referencing paths that probably
|
6
|
-
* do not exist on your machine. Just use it as a guide.
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*/
|
10
|
-
|
11
|
-
({
|
12
|
-
//The top level directory that contains your app. If this option is used
|
13
|
-
//then it assumed your scripts are in a subdirectory under this path.
|
14
|
-
//This option is not required. If it is not specified, then baseUrl
|
15
|
-
//below is the anchor point for finding things. If this option is specified,
|
16
|
-
//then all the files from the app directory will be copied to the dir:
|
17
|
-
//output area, and baseUrl will assume to be a relative path under
|
18
|
-
//this directory.
|
19
|
-
appDir: "some/path/",
|
20
|
-
|
21
|
-
//By default, all modules are located relative to this path. If baseUrl
|
22
|
-
//is not explicitly set, then all modules are loaded relative to
|
23
|
-
//the directory that holds the build file. If appDir is set, then
|
24
|
-
//baseUrl should be specified as relative to the appDir.
|
25
|
-
baseUrl: "./",
|
26
|
-
|
27
|
-
//Set paths for modules. If relative paths, set relative to baseUrl above.
|
28
|
-
//If a special value of "empty:" is used for the path value, then that
|
29
|
-
//acts like mapping the path to an empty file. It allows the optimizer to
|
30
|
-
//resolve the dependency to path, but then does not include it in the output.
|
31
|
-
//Useful to map module names that are to resources on a CDN or other
|
32
|
-
//http: URL when running in the browser and during an optimization that
|
33
|
-
//file should be skipped because it has no dependencies.
|
34
|
-
paths: {
|
35
|
-
"foo.bar": "../scripts/foo/bar",
|
36
|
-
"baz": "../another/path/baz"
|
37
|
-
},
|
38
|
-
|
39
|
-
//Configure CommonJS packages. See http://requirejs.org/docs/api.html#packages
|
40
|
-
//for more information.
|
41
|
-
packagePaths: [],
|
42
|
-
packages: [],
|
43
|
-
|
44
|
-
//The directory path to save the output. If not specified, then
|
45
|
-
//the path will default to be a directory called "build" as a sibling
|
46
|
-
//to the build file. All relative paths are relative to the build file.
|
47
|
-
dir: "../some/path",
|
48
|
-
|
49
|
-
//Used to inline i18n resources into the built file. If no locale
|
50
|
-
//is specified, i18n resources will not be inlined. Only one locale
|
51
|
-
//can be inlined for a build. Root bundles referenced by a build layer
|
52
|
-
//will be included in a build layer regardless of locale being set.
|
53
|
-
locale: "en-us",
|
54
|
-
|
55
|
-
//How to optimize all the JS files in the build output directory.
|
56
|
-
//Right now only the following values
|
57
|
-
//are supported:
|
58
|
-
//- "uglify": (default) uses UglifyJS to minify the code.
|
59
|
-
//- "closure": uses Google's Closure Compiler in simple optimization
|
60
|
-
//mode to minify the code. Only available if running the optimizer using
|
61
|
-
//Java.
|
62
|
-
//- "closure.keepLines": Same as closure option, but keeps line returns
|
63
|
-
//in the minified files.
|
64
|
-
//- "none": no minification will be done.
|
65
|
-
optimize: "uglify",
|
66
|
-
|
67
|
-
//If using UglifyJS for script optimization, these config options can be
|
68
|
-
//used to pass configuration values to UglifyJS.
|
69
|
-
//See https://github.com/mishoo/UglifyJS for the possible values.
|
70
|
-
uglify: {
|
71
|
-
gen_codeOptions: {},
|
72
|
-
strict_semicolons: {},
|
73
|
-
do_toplevel: {},
|
74
|
-
ast_squeezeOptions: {}
|
75
|
-
},
|
76
|
-
|
77
|
-
//If using Closure Compiler for script optimization, these config options
|
78
|
-
//can be used to configure Closure Compiler. See the documentation for
|
79
|
-
//Closure compiler for more information.
|
80
|
-
closure: {
|
81
|
-
CompilerOptions: {},
|
82
|
-
CompilationLevel: 'SIMPLE_OPTIMIZATIONS',
|
83
|
-
loggingLevel: 'WARNING'
|
84
|
-
}
|
85
|
-
|
86
|
-
//Allow CSS optimizations. Allowed values:
|
87
|
-
//- "standard": @import inlining, comment removal and line returns.
|
88
|
-
//Removing line returns may have problems in IE, depending on the type
|
89
|
-
//of CSS.
|
90
|
-
//- "standard.keepLines": like "standard" but keeps line returns.
|
91
|
-
//- "none": skip CSS optimizations.
|
92
|
-
optimizeCss: "standard.keepLines",
|
93
|
-
|
94
|
-
//If optimizeCss is in use, a list of of files to ignore for the @import
|
95
|
-
//inlining. The value of this option should be a comma separated list
|
96
|
-
//of CSS file names to ignore. The file names should match whatever
|
97
|
-
//strings are used in the @import calls.
|
98
|
-
cssImportIgnore: null,
|
99
|
-
|
100
|
-
//Inlines the text for any text! dependencies, to avoid the separate
|
101
|
-
//async XMLHttpRequest calls to load those dependencies.
|
102
|
-
inlineText: true,
|
103
|
-
|
104
|
-
//Allow "use strict"; be included in the RequireJS files.
|
105
|
-
//Default is false because there are not many browsers that can properly
|
106
|
-
//process and give errors on code for ES5 strict mode,
|
107
|
-
//and there is a lot of legacy code that will not work in strict mode.
|
108
|
-
useStrict: false,
|
109
|
-
|
110
|
-
//Specify build pragmas. If the source files contain comments like so:
|
111
|
-
//>>excludeStart("fooExclude", pragmas.fooExclude);
|
112
|
-
//>>excludeEnd("fooExclude");
|
113
|
-
//Then the comments that start with //>> are the build pragmas.
|
114
|
-
//excludeStart/excludeEnd and includeStart/includeEnd work, and the
|
115
|
-
//the pragmas value to the includeStart or excludeStart lines
|
116
|
-
//is evaluated to see if the code between the Start and End pragma
|
117
|
-
//lines should be included or excluded. If you have a choice to use
|
118
|
-
//"has" code or pragmas, use "has" code instead. Pragmas are harder
|
119
|
-
//to read, but they can be a bit more flexible on code removal vs.
|
120
|
-
//has-based code, which must follow JavaScript language rules.
|
121
|
-
//Pragmas also remove code in non-minified source, where has branch
|
122
|
-
//trimming is only done if the code is minified via UglifyJS or
|
123
|
-
//Closure Compiler.
|
124
|
-
pragmas: {
|
125
|
-
fooExclude: true
|
126
|
-
},
|
127
|
-
|
128
|
-
//Same as "pragmas", but only applied once during the file save phase
|
129
|
-
//of an optimization. "pragmas" are applied both during the dependency
|
130
|
-
//mapping and file saving phases on an optimization. Some pragmas
|
131
|
-
//should not be processed during the dependency mapping phase of an
|
132
|
-
//operation, such as the pragma in the CoffeeScript loader plugin,
|
133
|
-
//which wants the CoffeeScript compiler during the dependency mapping
|
134
|
-
//phase, but once files are saved as plain JavaScript, the CoffeeScript
|
135
|
-
//compiler is no longer needed. In that case, pragmasOnSave would be used
|
136
|
-
//to exclude the compiler code during the save phase.
|
137
|
-
pragmasOnSave: {
|
138
|
-
//Just an example
|
139
|
-
excludeCoffeeScript: true
|
140
|
-
},
|
141
|
-
|
142
|
-
//Allows trimming of code branches that use has.js-based feature detection:
|
143
|
-
//https://github.com/phiggins42/has.js
|
144
|
-
//The code branch trimming only happens if minification with UglifyJS or
|
145
|
-
//Closure Compiler is done. For more information, see:
|
146
|
-
//http://requirejs.org/docs/optimization.html#hasjs
|
147
|
-
has: {
|
148
|
-
'function-bind': true,
|
149
|
-
'string-trim': false
|
150
|
-
},
|
151
|
-
|
152
|
-
//Similar to pragmasOnSave, but for has tests -- only applied during the
|
153
|
-
//file save phase of optimization, where "has" is applied to both
|
154
|
-
//dependency mapping and file save phases.
|
155
|
-
hasOnSave: {
|
156
|
-
'function-bind': true,
|
157
|
-
'string-trim': false
|
158
|
-
},
|
159
|
-
|
160
|
-
//Allows namespacing requirejs, require and define calls to a new name.
|
161
|
-
//This allows stronger assurances of getting a module space that will
|
162
|
-
//not interfere with others using a define/require AMD-based module
|
163
|
-
//system. The example below will rename define() calls to foo.define().
|
164
|
-
//See http://requirejs.org/docs/faq-advanced.html#rename for a more
|
165
|
-
//complete example.
|
166
|
-
namespace: 'foo',
|
167
|
-
|
168
|
-
//Skip processing for pragmas.
|
169
|
-
skipPragmas: false,
|
170
|
-
|
171
|
-
//If skipModuleInsertion is false, then files that do not use define()
|
172
|
-
//to define modules will get a define() placeholder inserted for them.
|
173
|
-
//Also, require.pause/resume calls will be inserted.
|
174
|
-
//Set it to true to avoid this. This is useful if you are building code that
|
175
|
-
//does not use require() in the built project or in the JS files, but you
|
176
|
-
//still want to use the optimization tool from RequireJS to concatenate modules
|
177
|
-
//together.
|
178
|
-
skipModuleInsertion: false,
|
179
|
-
|
180
|
-
//If it is not a one file optimization, scan through all .js files in the
|
181
|
-
//output directory for any plugin resource dependencies, and if the plugin
|
182
|
-
//supports optimizing them as separate files, optimize them. Can be a
|
183
|
-
//slower optimization. Only use if there are some plugins that use things
|
184
|
-
//like XMLHttpRequest that do not work across domains, but the built code
|
185
|
-
//will be placed on another domain.
|
186
|
-
optimizeAllPluginResources: false,
|
187
|
-
|
188
|
-
//Finds require() dependencies inside a require() or define call. By default
|
189
|
-
//this value is false, because those resources should be considered dynamic/runtime
|
190
|
-
//calls. However, for some optimization scenarios,
|
191
|
-
//Introduced in 1.0.3. Previous versions incorrectly found the nested calls
|
192
|
-
//by default.
|
193
|
-
findNestedDependencies: false,
|
194
|
-
|
195
|
-
//List the modules that will be optimized. All their immediate and deep
|
196
|
-
//dependencies will be included in the module's file when the build is
|
197
|
-
//done. If that module or any of its dependencies includes i18n bundles,
|
198
|
-
//only the root bundles will be included unless the locale: section is set above.
|
199
|
-
modules: [
|
200
|
-
//Just specifying a module name means that module will be converted into
|
201
|
-
//a built file that contains all of its dependencies. If that module or any
|
202
|
-
//of its dependencies includes i18n bundles, they may not be included in the
|
203
|
-
//built file unless the locale: section is set above.
|
204
|
-
{
|
205
|
-
name: "foo/bar/bop",
|
206
|
-
|
207
|
-
//For build profiles that contain more than one modules entry,
|
208
|
-
//allow overrides for the properties that set for the whole build,
|
209
|
-
//for example a different set of pragmas for this module.
|
210
|
-
//The override's value is an object that can
|
211
|
-
//contain any of the other build options in this file.
|
212
|
-
override: {
|
213
|
-
pragmas: {
|
214
|
-
fooExclude: true
|
215
|
-
}
|
216
|
-
}
|
217
|
-
},
|
218
|
-
|
219
|
-
//This module entry combines all the dependencies of foo/bar/bop and foo/bar/bee
|
220
|
-
//and any of their dependencies into one file.
|
221
|
-
{
|
222
|
-
name: "foo/bar/bop",
|
223
|
-
include: ["foo/bar/bee"]
|
224
|
-
},
|
225
|
-
|
226
|
-
//This module entry combines all the dependencies of foo/bar/bip into one file,
|
227
|
-
//but excludes foo/bar/bop and its dependencies from the built file. If you want
|
228
|
-
//to exclude a module that is also another module being optimized, it is more
|
229
|
-
//efficient if you define that module optimization entry before using it
|
230
|
-
//in an exclude array.
|
231
|
-
{
|
232
|
-
name: "foo/bar/bip",
|
233
|
-
exclude: [
|
234
|
-
"foo/bar/bop"
|
235
|
-
]
|
236
|
-
},
|
237
|
-
|
238
|
-
//This module entry shows how to specify a specific module be excluded
|
239
|
-
//from the built module file. excludeShallow means just exclude that
|
240
|
-
//specific module, but if that module has nested dependencies that are
|
241
|
-
//part of the built file, keep them in there. This is useful during
|
242
|
-
//development when you want to have a fast bundled set of modules, but
|
243
|
-
//just develop/debug one or two modules at a time.
|
244
|
-
{
|
245
|
-
name: "foo/bar/bin",
|
246
|
-
excludeShallow: [
|
247
|
-
"foo/bar/bot"
|
248
|
-
]
|
249
|
-
}
|
250
|
-
],
|
251
|
-
|
252
|
-
//Wrap any build layer in a start and end text specified by wrap.
|
253
|
-
//Use this to encapsulate the module code so that define/require are
|
254
|
-
//not globals. The end text can expose some globals from your file,
|
255
|
-
//making it easy to create stand-alone libraries that do not mandate
|
256
|
-
//the end user use requirejs.
|
257
|
-
wrap: {
|
258
|
-
start: "(function() {",
|
259
|
-
end: "}());"
|
260
|
-
},
|
261
|
-
|
262
|
-
//Another way to use wrap, but uses default wrapping of:
|
263
|
-
//(function() { + content + }());
|
264
|
-
wrap: true,
|
265
|
-
|
266
|
-
//Another way to use wrap, but uses file paths. This makes it easier
|
267
|
-
//to have the start text contain license information and the end text
|
268
|
-
//to contain the global variable exports, like
|
269
|
-
//window.myGlobal = requirejs('myModule');
|
270
|
-
//File paths are relative to the build file, or if running a commmand
|
271
|
-
//line build, the current directory.
|
272
|
-
wrap: {
|
273
|
-
startFile: "part/start.frag",
|
274
|
-
endFile: "parts/end.frag"
|
275
|
-
},
|
276
|
-
|
277
|
-
//When the optimizer copies files from the source location to the
|
278
|
-
//destination directory, it will skip directories and files that start
|
279
|
-
//with a ".". If you want to copy .directories or certain .files, for
|
280
|
-
//instance if you keep some packages in a .packages directory, or copy
|
281
|
-
//over .htaccess files, you can set this to null. If you want to change
|
282
|
-
//the exclusion rules, change it to a different regexp. If the regexp
|
283
|
-
//matches, it means the directory will be excluded. This used to be
|
284
|
-
//called dirExclusionRegExp before the 1.0.2 release.
|
285
|
-
//As of 1.0.3, this value can also be a string that is converted to a
|
286
|
-
//RegExp via new RegExp().
|
287
|
-
fileExclusionRegExp: /^\./,
|
288
|
-
|
289
|
-
//By default, comments that have a license in them are preserved in the
|
290
|
-
//output. However, for a larger built files there could be a lot of
|
291
|
-
//comment files that may be better served by having a smaller comment
|
292
|
-
//at the top of the file that points to the list of all the licenses.
|
293
|
-
//This option will turn off the auto-preservation, but you will need
|
294
|
-
//work out how best to surface the license information.
|
295
|
-
preserveLicenseComments: true
|
296
|
-
})
|