jazz-jss 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (215) hide show
  1. data/dist/handlebars/handlebars.js +1493 -0
  2. data/dist/hashchange/{jquery.ba-hashchange.js → hashchange.js} +0 -0
  3. data/dist/jazz/lib/controller.js +1 -1
  4. data/dist/jazz/lib/core.js +3 -0
  5. data/dist/jazz/lib/db.js +1 -1
  6. data/dist/jazz/lib/helper.js +2 -1
  7. data/dist/jazz/lib/model.js +11 -4
  8. data/dist/jazz/lib/view.js +1 -1
  9. data/dist/jazz/module.js +15 -0
  10. data/dist/jquery/jquery.js +0 -0
  11. data/dist/require/require.js +0 -0
  12. data/dist/require/template.js +98 -0
  13. data/dist/underscore/underscore.js +0 -0
  14. data/lib/jazz/app_detector.rb +6 -3
  15. data/lib/jazz/app_generator.rb +12 -8
  16. data/lib/jazz/helper_generator.rb +30 -0
  17. data/lib/jazz/scaffold_generator.rb +4 -0
  18. data/templates/app_root/Rakefile +11 -0
  19. data/templates/app_root/{app → development/app}/assets/javascripts/application.js +0 -0
  20. data/templates/app_root/{app → development/app}/assets/stylesheets/application.css +0 -0
  21. data/templates/app_root/development/app/controllers/application_controller.js +11 -0
  22. data/templates/app_root/development/app/helpers/application_helper.js +7 -0
  23. data/templates/app_root/development/config/glue.js +9 -0
  24. data/templates/app_root/development/config/routes.js +5 -0
  25. data/templates/app_root/scripts/build.js +30 -0
  26. data/templates/app_root/scripts/r.js/LICENSE +58 -0
  27. data/templates/app_root/scripts/r.js/README.md +177 -0
  28. data/templates/app_root/scripts/r.js/build/build.js +26 -0
  29. data/templates/app_root/scripts/r.js/build/buildebug.sh +4 -0
  30. data/templates/app_root/scripts/r.js/build/example.build.js +296 -0
  31. data/templates/app_root/scripts/r.js/build/jslib/blank.js +4 -0
  32. data/templates/app_root/scripts/r.js/build/jslib/build.js +952 -0
  33. data/templates/app_root/scripts/r.js/build/jslib/commandLine.js +23 -0
  34. data/templates/app_root/scripts/r.js/build/jslib/commonJs.js +152 -0
  35. data/templates/app_root/scripts/r.js/build/jslib/env.js +47 -0
  36. data/templates/app_root/scripts/r.js/build/jslib/lang.js +49 -0
  37. data/templates/app_root/scripts/r.js/build/jslib/logger.js +58 -0
  38. data/templates/app_root/scripts/r.js/build/jslib/node.js +106 -0
  39. data/templates/app_root/scripts/r.js/build/jslib/node/args.js +20 -0
  40. data/templates/app_root/scripts/r.js/build/jslib/node/file.js +263 -0
  41. data/templates/app_root/scripts/r.js/build/jslib/node/load.js +17 -0
  42. data/templates/app_root/scripts/r.js/build/jslib/node/optimize.js +10 -0
  43. data/templates/app_root/scripts/r.js/build/jslib/node/print.js +16 -0
  44. data/templates/app_root/scripts/r.js/build/jslib/optimize.js +279 -0
  45. data/templates/app_root/scripts/r.js/build/jslib/opto.build.js +11 -0
  46. data/templates/app_root/scripts/r.js/build/jslib/parse.js +590 -0
  47. data/templates/app_root/scripts/r.js/build/jslib/pragma.js +251 -0
  48. data/templates/app_root/scripts/r.js/build/jslib/requirePatch.js +286 -0
  49. data/templates/app_root/scripts/r.js/build/jslib/rhino.js +22 -0
  50. data/templates/app_root/scripts/r.js/build/jslib/rhino/args.js +21 -0
  51. data/templates/app_root/scripts/r.js/build/jslib/rhino/file.js +244 -0
  52. data/templates/app_root/scripts/r.js/build/jslib/rhino/load.js +12 -0
  53. data/templates/app_root/scripts/r.js/build/jslib/rhino/optimize.js +100 -0
  54. data/templates/app_root/scripts/r.js/build/jslib/rhino/print.js +12 -0
  55. data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/README.md +16 -0
  56. data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/index.js +21 -0
  57. data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/parse-js.js +1342 -0
  58. data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/process.js +2005 -0
  59. data/templates/app_root/scripts/r.js/build/jslib/uglifyjs/squeeze-more.js +55 -0
  60. data/templates/app_root/scripts/r.js/build/jslib/x.js +243 -0
  61. data/templates/app_root/scripts/r.js/build/tests/all.js +47 -0
  62. data/templates/app_root/scripts/r.js/build/tests/allj.sh +3 -0
  63. data/templates/app_root/scripts/r.js/build/tests/alln.sh +18 -0
  64. data/templates/app_root/scripts/r.js/build/tests/anonSimple.build.js +7 -0
  65. data/templates/app_root/scripts/r.js/build/tests/buildUtils.js +19 -0
  66. data/templates/app_root/scripts/r.js/build/tests/builds.js +489 -0
  67. data/templates/app_root/scripts/r.js/build/tests/circular.build.js +18 -0
  68. data/templates/app_root/scripts/r.js/build/tests/convert.js +18 -0
  69. data/templates/app_root/scripts/r.js/build/tests/css.build.js +6 -0
  70. data/templates/app_root/scripts/r.js/build/tests/css/common/common.css +4 -0
  71. data/templates/app_root/scripts/r.js/build/tests/css/master.css +10 -0
  72. data/templates/app_root/scripts/r.js/build/tests/css/sub/sub1.css +7 -0
  73. data/templates/app_root/scripts/r.js/build/tests/cssTestCompare.css +13 -0
  74. data/templates/app_root/scripts/r.js/build/tests/end.frag +3 -0
  75. data/templates/app_root/scripts/r.js/build/tests/expected/unoExcludeShallow.js +23 -0
  76. data/templates/app_root/scripts/r.js/build/tests/exports.build.js +12 -0
  77. data/templates/app_root/scripts/r.js/build/tests/hasTestModule.build.js +10 -0
  78. data/templates/app_root/scripts/r.js/build/tests/hasTestModule.js +30 -0
  79. data/templates/app_root/scripts/r.js/build/tests/http/httpBuild.js +70 -0
  80. data/templates/app_root/scripts/r.js/build/tests/http/main.html +28 -0
  81. data/templates/app_root/scripts/r.js/build/tests/http/scripts/main.js +18 -0
  82. data/templates/app_root/scripts/r.js/build/tests/http/scripts/one.js +3 -0
  83. data/templates/app_root/scripts/r.js/build/tests/http/scripts/three.js +5 -0
  84. data/templates/app_root/scripts/r.js/build/tests/http/scripts/two.js +7 -0
  85. data/templates/app_root/scripts/r.js/build/tests/i18n.build.js +17 -0
  86. data/templates/app_root/scripts/r.js/build/tests/indexBuilder.build.js +8 -0
  87. data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/a.js +17 -0
  88. data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/b.js +8 -0
  89. data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/build.js +6 -0
  90. data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/c.js +7 -0
  91. data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/d.js +5 -0
  92. data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/expected.js +36 -0
  93. data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/node_modules/amdefine/LICENSE +58 -0
  94. data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/node_modules/amdefine/amdefine.js +188 -0
  95. data/templates/app_root/scripts/r.js/build/tests/lib/amdefine/node_modules/amdefine/package.json +21 -0
  96. data/templates/app_root/scripts/r.js/build/tests/lib/comments/bang.js +10 -0
  97. data/templates/app_root/scripts/r.js/build/tests/lib/comments/build.js +6 -0
  98. data/templates/app_root/scripts/r.js/build/tests/lib/comments/expected.js +9 -0
  99. data/templates/app_root/scripts/r.js/build/tests/lib/comments/license.js +13 -0
  100. data/templates/app_root/scripts/r.js/build/tests/lib/dotpackage/scripts/app.build.js +15 -0
  101. data/templates/app_root/scripts/r.js/build/tests/lib/dotpackage/scripts/main-expected.js +13 -0
  102. data/templates/app_root/scripts/r.js/build/tests/lib/dotpackage/scripts/main.js +7 -0
  103. data/templates/app_root/scripts/r.js/build/tests/lib/empty/build.js +13 -0
  104. data/templates/app_root/scripts/r.js/build/tests/lib/empty/expected.js +8 -0
  105. data/templates/app_root/scripts/r.js/build/tests/lib/empty/main.js +1 -0
  106. data/templates/app_root/scripts/r.js/build/tests/lib/empty/sub1.js +1 -0
  107. data/templates/app_root/scripts/r.js/build/tests/lib/empty/sub2.js +1 -0
  108. data/templates/app_root/scripts/r.js/build/tests/lib/nameInsertion/build.js +6 -0
  109. data/templates/app_root/scripts/r.js/build/tests/lib/nameInsertion/expected.js +12 -0
  110. data/templates/app_root/scripts/r.js/build/tests/lib/nameInsertion/main.js +9 -0
  111. data/templates/app_root/scripts/r.js/build/tests/lib/namespace/build.js +8 -0
  112. data/templates/app_root/scripts/r.js/build/tests/lib/namespace/expected.js +47 -0
  113. data/templates/app_root/scripts/r.js/build/tests/lib/namespace/main.js +6 -0
  114. data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/four.js +7 -0
  115. data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/one.js +9 -0
  116. data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/three.js +14 -0
  117. data/templates/app_root/scripts/r.js/build/tests/lib/namespace/modules/two.js +5 -0
  118. data/templates/app_root/scripts/r.js/build/tests/lib/nested/a.js +12 -0
  119. data/templates/app_root/scripts/r.js/build/tests/lib/nested/b.js +3 -0
  120. data/templates/app_root/scripts/r.js/build/tests/lib/nested/build.js +6 -0
  121. data/templates/app_root/scripts/r.js/build/tests/lib/nested/buildWithCE.js +7 -0
  122. data/templates/app_root/scripts/r.js/build/tests/lib/nested/c.js +3 -0
  123. data/templates/app_root/scripts/r.js/build/tests/lib/nested/d.js +3 -0
  124. data/templates/app_root/scripts/r.js/build/tests/lib/nested/e.js +3 -0
  125. data/templates/app_root/scripts/r.js/build/tests/lib/nested/expected-built.js +36 -0
  126. data/templates/app_root/scripts/r.js/build/tests/lib/nested/expected-builtWithCE.js +42 -0
  127. data/templates/app_root/scripts/r.js/build/tests/lib/nested/main.js +3 -0
  128. data/templates/app_root/scripts/r.js/build/tests/lib/nested/top.js +10 -0
  129. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/a.js +3 -0
  130. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/b.js +3 -0
  131. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/build.js +6 -0
  132. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedAll.js +9 -0
  133. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedB.js +11 -0
  134. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedC.js +11 -0
  135. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNeedD.js +11 -0
  136. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/buildNested.js +7 -0
  137. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/c.js +3 -0
  138. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/d.js +3 -0
  139. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-built.js +21 -0
  140. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedAll.js +31 -0
  141. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedB.js +24 -0
  142. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedC.js +24 -0
  143. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNeedD.js +25 -0
  144. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/expected-builtNested.js +31 -0
  145. data/templates/app_root/scripts/r.js/build/tests/lib/nestedHas/main.js +17 -0
  146. data/templates/app_root/scripts/r.js/build/tests/lib/plugins/build.js +6 -0
  147. data/templates/app_root/scripts/r.js/build/tests/lib/plugins/converter.js +11 -0
  148. data/templates/app_root/scripts/r.js/build/tests/lib/plugins/main.js +6 -0
  149. data/templates/app_root/scripts/r.js/build/tests/lib/plugins/plug.js +29 -0
  150. data/templates/app_root/scripts/r.js/build/tests/lib/plugins/util.js +7 -0
  151. data/templates/app_root/scripts/r.js/build/tests/nameOnly.build.js +10 -0
  152. data/templates/app_root/scripts/r.js/build/tests/nodeAll.js +3 -0
  153. data/templates/app_root/scripts/r.js/build/tests/nodeOptimize.js +12 -0
  154. data/templates/app_root/scripts/r.js/build/tests/nodeOptimizeNoCallback.js +10 -0
  155. data/templates/app_root/scripts/r.js/build/tests/order.build.js +16 -0
  156. data/templates/app_root/scripts/r.js/build/tests/override/override.js +36 -0
  157. data/templates/app_root/scripts/r.js/build/tests/packages.build.js +59 -0
  158. data/templates/app_root/scripts/r.js/build/tests/parse.js +103 -0
  159. data/templates/app_root/scripts/r.js/build/tests/simple.build.js +13 -0
  160. data/templates/app_root/scripts/r.js/build/tests/simpleNamespace.build.js +17 -0
  161. data/templates/app_root/scripts/r.js/build/tests/start.frag +4 -0
  162. data/templates/app_root/scripts/r.js/build/tests/text.build.js +16 -0
  163. data/templates/app_root/scripts/r.js/build/tests/textExclude.build.js +16 -0
  164. data/templates/app_root/scripts/r.js/dist.js +95 -0
  165. data/templates/app_root/scripts/r.js/dist/README.md +6 -0
  166. data/templates/app_root/scripts/r.js/dist/r-1.0.0.js +9042 -0
  167. data/templates/app_root/scripts/r.js/dist/r-edge.js +9191 -0
  168. data/templates/app_root/scripts/r.js/dist/r.js +9099 -0
  169. data/templates/app_root/scripts/r.js/lib/closure/COPYING +202 -0
  170. data/templates/app_root/scripts/r.js/lib/closure/README +292 -0
  171. data/templates/app_root/scripts/r.js/lib/closure/compiler.jar +0 -0
  172. data/templates/app_root/scripts/r.js/lib/rhino/LICENSE +4 -0
  173. data/templates/app_root/scripts/r.js/lib/rhino/js.jar +0 -0
  174. data/templates/app_root/scripts/r.js/require.js +1952 -0
  175. data/templates/app_root/scripts/r.js/tasks.txt +2 -0
  176. data/templates/app_root/scripts/r.js/tests/all.js +49 -0
  177. data/templates/app_root/scripts/r.js/tests/allNode.js +3 -0
  178. data/templates/app_root/scripts/r.js/tests/allj.sh +1 -0
  179. data/templates/app_root/scripts/r.js/tests/alln.sh +2 -0
  180. data/templates/app_root/scripts/r.js/tests/alpha.js +3 -0
  181. data/templates/app_root/scripts/r.js/tests/beta.js +6 -0
  182. data/templates/app_root/scripts/r.js/tests/doh/LICENSE +195 -0
  183. data/templates/app_root/scripts/r.js/tests/doh/README +12 -0
  184. data/templates/app_root/scripts/r.js/tests/doh/_browserRunner.js +855 -0
  185. data/templates/app_root/scripts/r.js/tests/doh/_nodeRunner.js +20 -0
  186. data/templates/app_root/scripts/r.js/tests/doh/_rhinoRunner.js +17 -0
  187. data/templates/app_root/scripts/r.js/tests/doh/_sounds/LICENSE +10 -0
  188. data/templates/app_root/scripts/r.js/tests/doh/_sounds/doh.wav +0 -0
  189. data/templates/app_root/scripts/r.js/tests/doh/_sounds/dohaaa.wav +0 -0
  190. data/templates/app_root/scripts/r.js/tests/doh/_sounds/woohoo.wav +0 -0
  191. data/templates/app_root/scripts/r.js/tests/doh/runner.html +316 -0
  192. data/templates/app_root/scripts/r.js/tests/doh/runner.js +1499 -0
  193. data/templates/app_root/scripts/r.js/tests/doh/runner.sh +3 -0
  194. data/templates/app_root/scripts/r.js/tests/doh/small_logo.png +0 -0
  195. data/templates/app_root/scripts/r.js/tests/node/canvasTest.js +39 -0
  196. data/templates/app_root/scripts/r.js/tests/node/embedded/README.md +15 -0
  197. data/templates/app_root/scripts/r.js/tests/node/embedded/coffee/foo.coffee +1 -0
  198. data/templates/app_root/scripts/r.js/tests/node/embedded/main.js +13 -0
  199. data/templates/app_root/scripts/r.js/tests/node/embedded/scripts/bar.js +13 -0
  200. data/templates/app_root/scripts/r.js/tests/node/index.js +11 -0
  201. data/templates/app_root/scripts/r.js/tests/node/tests/alpha/foo.js +6 -0
  202. data/templates/app_root/scripts/r.js/tests/node/tests/alpha/hello.html +9 -0
  203. data/templates/app_root/scripts/r.js/tests/node/tests/foo.js +3 -0
  204. data/templates/app_root/scripts/r.js/tests/node/tests/server.js +11 -0
  205. data/templates/app_root/scripts/r.js/tests/relative.js +10 -0
  206. data/templates/app_root/scripts/r.js/tests/sub/betaSub.js +3 -0
  207. data/templates/application.js +6 -5
  208. data/templates/boot.js +42 -0
  209. data/templates/helper.js +9 -0
  210. data/templates/index.html +1 -1
  211. metadata +201 -11
  212. data/dist/jazz/main.js +0 -65
  213. data/dist/mustache/mustache.js +0 -324
  214. data/templates/app_root/config/routes.js +0 -4
  215. data/templates/glue.js +0 -4
@@ -0,0 +1,55 @@
1
+ define(["require", "exports", "module", "./parse-js", "./process"], function(require, exports, module) {
2
+
3
+ var jsp = require("./parse-js"),
4
+ pro = require("./process"),
5
+ slice = jsp.slice,
6
+ member = jsp.member,
7
+ curry = jsp.curry,
8
+ MAP = pro.MAP,
9
+ PRECEDENCE = jsp.PRECEDENCE,
10
+ OPERATORS = jsp.OPERATORS;
11
+
12
+ function ast_squeeze_more(ast) {
13
+ var w = pro.ast_walker(), walk = w.walk, scope;
14
+ function with_scope(s, cont) {
15
+ var save = scope, ret;
16
+ scope = s;
17
+ ret = cont();
18
+ scope = save;
19
+ return ret;
20
+ };
21
+ function _lambda(name, args, body) {
22
+ return [ this[0], name, args, with_scope(body.scope, curry(MAP, body, walk)) ];
23
+ };
24
+ return w.with_walkers({
25
+ "toplevel": function(body) {
26
+ return [ this[0], with_scope(this.scope, curry(MAP, body, walk)) ];
27
+ },
28
+ "function": _lambda,
29
+ "defun": _lambda,
30
+ "new": function(ctor, args) {
31
+ if (ctor[0] == "name" && ctor[1] == "Array" && !scope.has("Array")) {
32
+ if (args.length != 1) {
33
+ return [ "array", args ];
34
+ } else {
35
+ return walk([ "call", [ "name", "Array" ], args ]);
36
+ }
37
+ }
38
+ },
39
+ "call": function(expr, args) {
40
+ if (expr[0] == "dot" && expr[2] == "toString" && args.length == 0) {
41
+ // foo.toString() ==> foo+""
42
+ return [ "binary", "+", expr[1], [ "string", "" ]];
43
+ }
44
+ if (expr[0] == "name" && expr[1] == "Array" && args.length != 1 && !scope.has("Array")) {
45
+ return [ "array", args ];
46
+ }
47
+ }
48
+ }, function() {
49
+ return walk(pro.ast_add_scope(ast));
50
+ });
51
+ };
52
+
53
+ exports.ast_squeeze_more = ast_squeeze_more;
54
+
55
+ });
@@ -0,0 +1,243 @@
1
+ /**
2
+ * @license r.js 1.0.2+ 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
+ * This is a bootstrap script to allow running RequireJS in the command line
9
+ * in either a Java/Rhino or Node environment. It is modified by the top-level
10
+ * dist.js file to inject other files to completely enable this file. It is
11
+ * the shell of the r.js file.
12
+ */
13
+
14
+ /*jslint strict: false, evil: true, nomen: false */
15
+ /*global readFile: true, process: false, Packages: false, print: false,
16
+ console: false, java: false, module: false */
17
+
18
+ var requirejs, require, define;
19
+ (function (console, args, readFileFunc) {
20
+
21
+ var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
22
+ nodeDefine, exists, reqMain, loadedOptimizedLib,
23
+ version = '1.0.2+',
24
+ jsSuffixRegExp = /\.js$/,
25
+ commandOption = '',
26
+ //Used by jslib/rhino/args.js
27
+ rhinoArgs = args,
28
+ readFile = typeof readFileFunc !== 'undefined' ? readFileFunc : null;
29
+
30
+ function showHelp() {
31
+ console.log('See https://github.com/jrburke/r.js for usage.');
32
+ }
33
+
34
+ if (typeof Packages !== 'undefined') {
35
+ env = 'rhino';
36
+
37
+ fileName = args[0];
38
+
39
+ if (fileName && fileName.indexOf('-') === 0) {
40
+ commandOption = fileName.substring(1);
41
+ fileName = args[1];
42
+ }
43
+
44
+ //Set up execution context.
45
+ rhinoContext = Packages.org.mozilla.javascript.ContextFactory.getGlobal().enterContext();
46
+
47
+ exec = function (string, name) {
48
+ return rhinoContext.evaluateString(this, string, name, 0, null);
49
+ };
50
+
51
+ exists = function (fileName) {
52
+ return (new java.io.File(fileName)).exists();
53
+ };
54
+
55
+ //Define a console.log for easier logging. Don't
56
+ //get fancy though.
57
+ if (typeof console === 'undefined') {
58
+ console = {
59
+ log: function () {
60
+ print.apply(undefined, arguments);
61
+ }
62
+ };
63
+ }
64
+ } else if (typeof process !== 'undefined') {
65
+ env = 'node';
66
+
67
+ //Get the fs module via Node's require before it
68
+ //gets replaced. Used in require/node.js
69
+ fs = require('fs');
70
+ vm = require('vm');
71
+ path = require('path');
72
+ nodeRequire = require;
73
+ nodeDefine = define;
74
+ reqMain = require.main;
75
+
76
+ //Temporarily hide require and define to allow require.js to define
77
+ //them.
78
+ require = undefined;
79
+ define = undefined;
80
+
81
+ readFile = function (path) {
82
+ return fs.readFileSync(path, 'utf8');
83
+ };
84
+
85
+ exec = function (string, name) {
86
+ return vm.runInThisContext(this.requirejsVars.require.makeNodeWrapper(string),
87
+ name ? fs.realpathSync(name) : '');
88
+ };
89
+
90
+ exists = function (fileName) {
91
+ return path.existsSync(fileName);
92
+ };
93
+
94
+
95
+ fileName = process.argv[2];
96
+
97
+ if (fileName && fileName.indexOf('-') === 0) {
98
+ commandOption = fileName.substring(1);
99
+ fileName = process.argv[3];
100
+ }
101
+ }
102
+
103
+ //INSERT require.js
104
+
105
+ if (env === 'rhino') {
106
+ //INSERT build/jslib/rhino.js
107
+ } else if (env === 'node') {
108
+ this.requirejsVars = {
109
+ require: require,
110
+ requirejs: require,
111
+ define: define,
112
+ nodeRequire: nodeRequire
113
+ };
114
+ require.nodeRequire = nodeRequire;
115
+
116
+ //INSERT build/jslib/node.js
117
+
118
+ }
119
+
120
+ //Support a default file name to execute. Useful for hosted envs
121
+ //like Joyent where it defaults to a server.js as the only executed
122
+ //script. But only do it if this is not an optimization run.
123
+ if (commandOption !== 'o' && (!fileName || !jsSuffixRegExp.test(fileName))) {
124
+ fileName = 'main.js';
125
+ }
126
+
127
+ /**
128
+ * Loads the library files that can be used for the optimizer, or for other
129
+ * tasks.
130
+ */
131
+ function loadLib() {
132
+ //INSERT LIB
133
+ }
134
+
135
+
136
+ /**
137
+ * Sets the default baseUrl for requirejs to be directory of top level
138
+ * script.
139
+ */
140
+ function setBaseUrl(fileName) {
141
+ //Use the file name's directory as the baseUrl if available.
142
+ dir = fileName.replace(/\\/g, '/');
143
+ if (dir.indexOf('/') !== -1) {
144
+ dir = dir.split('/');
145
+ dir.pop();
146
+ dir = dir.join('/');
147
+ exec("require({baseUrl: '" + dir + "'});");
148
+ }
149
+ }
150
+
151
+ //If in Node, and included via a require('requirejs'), just export and
152
+ //THROW IT ON THE GROUND!
153
+ if (env === 'node' && reqMain !== module) {
154
+ setBaseUrl(path.resolve(reqMain ? reqMain.filename : '.'));
155
+
156
+ //Create a method that will run the optimzer given an object
157
+ //config.
158
+ requirejs.optimize = function (config, callback) {
159
+ if (!loadedOptimizedLib) {
160
+ loadLib();
161
+ loadedOptimizedLib = true;
162
+ }
163
+
164
+ //Create the function that will be called once build modules
165
+ //have been loaded.
166
+ var runBuild = function (build, logger) {
167
+ //Make sure config has a log level, and if not,
168
+ //make it "silent" by default.
169
+ config.logLevel = config.hasOwnProperty('logLevel') ?
170
+ config.logLevel : logger.SILENT;
171
+
172
+ var result = build(config);
173
+
174
+ //Reset build internals on each run.
175
+ requirejs._buildReset();
176
+
177
+ if (callback) {
178
+ callback(result);
179
+ }
180
+ };
181
+
182
+ //Enable execution of this callback in a build setting.
183
+ //Normally, once requirePatch is run, by default it will
184
+ //not execute callbacks, unless this property is set on
185
+ //the callback.
186
+ runBuild.__requireJsBuild = true;
187
+
188
+ requirejs({
189
+ context: 'build'
190
+ }, ['build', 'logger'], runBuild);
191
+ };
192
+
193
+ requirejs.define = define;
194
+
195
+ module.exports = requirejs;
196
+ return;
197
+ }
198
+
199
+ if (commandOption === 'o') {
200
+ //Do the optimizer work.
201
+ loadLib();
202
+
203
+ //INSERT build/build.js
204
+
205
+ } else if (commandOption === 'v') {
206
+ console.log('r.js: ' + version + ', RequireJS: ' + this.requirejsVars.require.version);
207
+ } else if (commandOption === 'convert') {
208
+ loadLib();
209
+
210
+ this.requirejsVars.require(['env!env/args', 'commonJs', 'env!env/print'],
211
+ function (args, commonJs, print) {
212
+
213
+ var srcDir, outDir;
214
+ srcDir = args[0];
215
+ outDir = args[1];
216
+
217
+ if (!srcDir || !outDir) {
218
+ print('Usage: path/to/commonjs/modules output/dir');
219
+ return;
220
+ }
221
+
222
+ commonJs.convertDir(args[0], args[1]);
223
+ });
224
+ } else {
225
+ //Just run an app
226
+
227
+ //Load the bundled libraries for use in the app.
228
+ if (commandOption === 'lib') {
229
+ loadLib();
230
+ }
231
+
232
+ setBaseUrl(fileName);
233
+
234
+ if (exists(fileName)) {
235
+ exec(readFile(fileName), fileName);
236
+ } else {
237
+ showHelp();
238
+ }
239
+ }
240
+
241
+ }((typeof console !== 'undefined' ? console : undefined),
242
+ (typeof Packages !== 'undefined' ? Array.prototype.slice.call(arguments, 0) : []),
243
+ (typeof readFile !== 'undefined' ? readFile : undefined)));
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @license RequireJS 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
+ * Run the tests in Node with this command:
9
+ * ../../bin/x all.js
10
+ */
11
+
12
+ /*jslint plusplus: false, strict: false */
13
+ /*global require: false, doh: false, skipDohSetup: true */
14
+
15
+ //A hack to doh to avoid dojo setup stuff in doh/runner.js
16
+ skipDohSetup = true;
17
+
18
+ //Set baseUrl for default context, but use a different context
19
+ //to run the tests, since at least one test run clears out the
20
+ //default context between each run.
21
+ require({
22
+ baseUrl: '../jslib/'
23
+ });
24
+
25
+ //Run the tests in a different context.
26
+ require({
27
+ baseUrl: '../jslib/',
28
+ paths: {
29
+ tests: '../tests'
30
+ },
31
+ context: 'test'
32
+ }, [
33
+ '../../tests/doh/runner.js',
34
+ 'env!../../tests/doh/_{env}Runner.js',
35
+ 'tests/convert',
36
+ 'tests/parse',
37
+ 'tests/buildUtils',
38
+
39
+ //Build tests should be last in case they alter the environment
40
+ //in a weird way.
41
+ 'tests/builds'
42
+ ]);
43
+
44
+ //Show final report. Do this outside the require call, not
45
+ //in a require callback because the builds will modify require.js
46
+ //to not call callbacks.
47
+ doh.run();
@@ -0,0 +1,3 @@
1
+ set -e
2
+
3
+ java -classpath ../../lib/rhino/js.jar:../../lib/closure.compiler.jar org.mozilla.javascript.tools.shell.Main ../../r.js all.js
@@ -0,0 +1,18 @@
1
+ #Stop after any error
2
+ set -e
3
+
4
+ rm -rf ./builds/
5
+ echo "Running tests embedded in Node"
6
+ echo "=============================="
7
+ node nodeOptimize.js
8
+ rm -rf ./builds/
9
+
10
+ node nodeOptimizeNoCallback.js
11
+ rm -rf ./builds/
12
+
13
+ node nodeAll.js
14
+ rm -rf ./builds/
15
+
16
+ echo "\nRunning tests via bootstrap"
17
+ echo "=============================="
18
+ node ../../r.js all.js
@@ -0,0 +1,7 @@
1
+ //A simple build file using the tests directory for requirejs
2
+ {
3
+ baseUrl: "../../../requirejs/tests/anon",
4
+ optimize: "none",
5
+ out: "builds/anonSimple.js",
6
+ include: ["magenta", "red", "blue", "green", "yellow"]
7
+ }
@@ -0,0 +1,19 @@
1
+ /*jslint plusplus: false, strict: false */
2
+ /*global load: false, doh: false, define:false */
3
+
4
+ define(['build'], function (build) {
5
+
6
+ doh.register("toTransport",
7
+ [
8
+ function toTransport(t) {
9
+ var bad1 = "this.define(field, value, {_resolve: false});",
10
+ layer = {
11
+ modulesWithNames: {}
12
+ };
13
+
14
+ t.is(bad1, build.toTransport(build.makeAnonDefRegExp(), '', 'bad/1', 'bad1', bad1, layer));
15
+ }
16
+ ]
17
+ );
18
+ doh.run();
19
+ });
@@ -0,0 +1,489 @@
1
+ /*jslint plusplus: false, nomen: false, strict: false */
2
+ /*global define: false, require: false, doh: false */
3
+
4
+ define(['build', 'env!env/file'], function (build, file) {
5
+ //Remove any old builds
6
+ file.deleteFile("builds");
7
+
8
+ function c(fileName) {
9
+ return file.readFile(fileName);
10
+ }
11
+
12
+ //Remove line returns to make comparisons easier.
13
+ function nol(contents) {
14
+ return contents.replace(/[\r\n]/g, "");
15
+ }
16
+
17
+ //Do a build of the text plugin to get any pragmas processed.
18
+ build(["name=text", "baseUrl=../../../requirejs", "out=builds/text.js", "optimize=none"]);
19
+
20
+ //Reset build state for next run.
21
+ require._buildReset();
22
+
23
+ var requireTextContents = c("builds/text.js"),
24
+ oneResult = [
25
+ c("../../../requirejs/tests/dimple.js"),
26
+ c("../../../requirejs/tests/two.js"),
27
+ c("../../../requirejs/tests/one.js"),
28
+ ";"
29
+ ].join("");
30
+
31
+ doh.register("buildOneCssFile",
32
+ [
33
+ function buildOneCssFile(t) {
34
+ build(["cssIn=css/sub/sub1.css", "out=builds/sub1.css"]);
35
+
36
+ t.is(nol(c("cssTestCompare.css")), nol(c("builds/sub1.css")));
37
+
38
+ //Reset require internal state for the contexts so future
39
+ //builds in these tests will work correctly.
40
+ require._buildReset();
41
+ }
42
+ ]
43
+ );
44
+ doh.run();
45
+
46
+ doh.register("buildOneJsFile",
47
+ [
48
+ function buildOneJsFile(t) {
49
+ build(["name=one", "include=dimple", "out=builds/outSingle.js",
50
+ "baseUrl=../../../requirejs/tests", "optimize=none"]);
51
+
52
+ t.is(nol(oneResult), nol(c("builds/outSingle.js")));
53
+
54
+ //Reset require internal state for the contexts so future
55
+ //builds in these tests will work correctly.
56
+ require._buildReset();
57
+ }
58
+ ]
59
+ );
60
+ doh.run();
61
+
62
+
63
+ doh.register("buildOneJsFileWrapped",
64
+ [
65
+ function buildOneJsFile(t) {
66
+ build(["name=one", "include=dimple", "out=builds/outSingleWrap.js",
67
+ "baseUrl=../../../requirejs/tests", "optimize=none",
68
+ "wrap.start=START", "wrap.end=END"]);
69
+
70
+ t.is(nol("START" + oneResult + "END"), nol(c("builds/outSingleWrap.js")));
71
+
72
+ //Reset require internal state for the contexts so future
73
+ //builds in these tests will work correctly.
74
+ require._buildReset();
75
+ }
76
+ ]
77
+ );
78
+ doh.run();
79
+
80
+ doh.register("buildOneJsFileWrappedTrue",
81
+ [
82
+ function buildOneJsFile(t) {
83
+ build(["name=one", "include=dimple", "out=builds/outSingleWrapTrue.js",
84
+ "baseUrl=../../../requirejs/tests", "optimize=none",
85
+ "wrap=true"]);
86
+
87
+ t.is(nol("(function () {" + oneResult + "}());"), nol(c("builds/outSingleWrapTrue.js")));
88
+
89
+ //Reset require internal state for the contexts so future
90
+ //builds in these tests will work correctly.
91
+ require._buildReset();
92
+ }
93
+ ]
94
+ );
95
+ doh.run();
96
+
97
+ doh.register("buildOneJsFileWrappedFile",
98
+ [
99
+ function buildOneJsFile(t) {
100
+ build(["name=one", "include=dimple", "out=builds/outSingleWrap.js",
101
+ "baseUrl=../../../requirejs/tests", "optimize=none",
102
+ "wrap.startFile=start.frag", "wrap.endFile=end.frag"]);
103
+
104
+ t.is(nol(c("start.frag") + oneResult + c("end.frag")), nol(c("builds/outSingleWrap.js")));
105
+
106
+ //Reset require internal state for the contexts so future
107
+ //builds in these tests will work correctly.
108
+ require._buildReset();
109
+ }
110
+ ]
111
+ );
112
+ doh.run();
113
+
114
+ doh.register("buildSimple",
115
+ [
116
+ function buildSimple(t) {
117
+ //Do the build
118
+ build(["simple.build.js"]);
119
+
120
+ t.is(nol(oneResult), nol(c("builds/simple/one.js")));
121
+
122
+ //Reset require internal state for the contexts so future
123
+ //builds in these tests will work correctly.
124
+ require._buildReset();
125
+ }
126
+ ]
127
+ );
128
+ doh.run();
129
+
130
+ doh.register("buildExcludeShallow",
131
+ [
132
+ function buildExcludeShallow(t) {
133
+ build(["name=uno", "excludeShallow=dos", "out=builds/unoExcludeShallow.js",
134
+ "baseUrl=../../../requirejs/tests", "optimize=none"]);
135
+
136
+ t.is(nol(c("expected/unoExcludeShallow.js")), nol(c("builds/unoExcludeShallow.js")));
137
+ require._buildReset();
138
+ }
139
+ ]
140
+ );
141
+ doh.run();
142
+
143
+ doh.register("buildExclude",
144
+ [
145
+ function buildExclude(t) {
146
+ build(["name=uno", "exclude=dos", "out=builds/unoExclude.js",
147
+ "baseUrl=../../../requirejs/tests", "optimize=none"]);
148
+
149
+ t.is(nol(c("../../../requirejs/tests/uno.js")), nol(c("builds/unoExclude.js")));
150
+ require._buildReset();
151
+ }
152
+ ]
153
+ );
154
+ doh.run();
155
+
156
+ doh.register("buildTextPluginIncluded",
157
+ [
158
+ function buildTextPluginIncluded(t) {
159
+ build(["name=one", "include=text", "out=builds/oneText.js",
160
+ "baseUrl=../../../requirejs/tests", "paths.text=../text", "optimize=none"]);
161
+
162
+ t.is(nol(requireTextContents +
163
+ nol(c("../../../requirejs/tests/two.js") +
164
+ c("../../../requirejs/tests/one.js") + ";")), nol(c("builds/oneText.js")));
165
+ require._buildReset();
166
+ }
167
+
168
+ ]
169
+ );
170
+ doh.run();
171
+
172
+ doh.register("buildPluginAsModule",
173
+ [
174
+ function buildPluginAsModule(t) {
175
+ build(["name=refine!a", "out=builds/refineATest.js",
176
+ "baseUrl=../../../requirejs/tests/plugins/fromText",
177
+ "exclude=text,refine",
178
+ "paths.text=../../../text", "optimize=none"]);
179
+
180
+ t.is(nol(nol((c("../../../requirejs/tests/plugins/fromText/a.refine"))
181
+ .replace(/refine/g, 'define')))
182
+ .replace(/define\(\{/, "define('refine!a',{"),
183
+ nol(c("builds/refineATest.js")));
184
+
185
+ require._buildReset();
186
+ }
187
+
188
+ ]
189
+ );
190
+ doh.run();
191
+
192
+
193
+ doh.register("buildUniversal",
194
+ [
195
+ function buildUniversal(t) {
196
+ build(["baseUrl=../../../requirejs/tests/universal",
197
+ "name=universal-tests",
198
+ "out=../../../requirejs/tests/universal/universal-tests-built.js",
199
+ "optimize=none"]);
200
+
201
+ t.is(nol(c("../../../requirejs/tests/universal/universal-tests-built-expected.js")),
202
+ nol(c("../../../requirejs/tests/universal/universal-tests-built.js")));
203
+
204
+ require._buildReset();
205
+ }
206
+
207
+ ]
208
+ );
209
+ doh.run();
210
+
211
+
212
+ doh.register("buildNamespace",
213
+ [
214
+ function buildNamespace(t) {
215
+ build(["baseUrl=lib/namespace", "optimize=none", "namespace=foo",
216
+ "name=main", "out=lib/namespace/foo.js"]);
217
+
218
+ t.is(nol(c("lib/namespace/expected.js")),
219
+ nol(c("lib/namespace/foo.js")));
220
+
221
+ require._buildReset();
222
+ }
223
+
224
+ ]
225
+ );
226
+ doh.run();
227
+
228
+ doh.register("useDotPackage",
229
+ [
230
+ function useDotPackage(t) {
231
+ file.deleteFile("lib/dotpackage/built");
232
+
233
+ build(["lib/dotpackage/scripts/app.build.js"]);
234
+
235
+ t.is(nol(c("lib/dotpackage/scripts/main-expected.js")),
236
+ nol(c("lib/dotpackage/built/scripts/main.js")));
237
+
238
+ require._buildReset();
239
+ }
240
+
241
+ ]
242
+ );
243
+ doh.run();
244
+
245
+ doh.register("multipleEmpty",
246
+ [
247
+ function multipleEmpty(t) {
248
+ file.deleteFile("lib/empty/built");
249
+
250
+ build(["lib/empty/build.js"]);
251
+
252
+ t.is(nol(c("lib/empty/expected.js")),
253
+ nol(c("lib/empty/built/main.js")));
254
+
255
+ require._buildReset();
256
+ }
257
+
258
+ ]
259
+ );
260
+ doh.run();
261
+
262
+ doh.register("preserveLicense",
263
+ [
264
+ function preserveLicense(t) {
265
+ file.deleteFile("lib/comments/built.js");
266
+
267
+ build(["lib/comments/build.js"]);
268
+
269
+ t.is(nol(c("lib/comments/expected.js")),
270
+ nol(c("lib/comments/built.js")));
271
+
272
+ require._buildReset();
273
+ }
274
+
275
+ ]
276
+ );
277
+ doh.run();
278
+
279
+ doh.register("nestedFind",
280
+ [
281
+ function nestedFind(t) {
282
+ file.deleteFile("lib/nested/main-builtWithCE.js");
283
+
284
+ //Clear the cached file contents since the
285
+ //findNestedDependencies config actually modifies
286
+ //what the contents could be.
287
+ require._cachedFileContents = {};
288
+
289
+ build(["lib/nested/buildWithCE.js"]);
290
+
291
+ t.is(nol(c("lib/nested/expected-builtWithCE.js")),
292
+ nol(c("lib/nested/main-builtWithCE.js")));
293
+
294
+ require._buildReset();
295
+ }
296
+
297
+ ]
298
+ );
299
+ doh.run();
300
+
301
+ doh.register("nestedSkip",
302
+ [
303
+ function nestedSkip(t) {
304
+ file.deleteFile("lib/nested/main-built.js");
305
+
306
+ //Clear the cached file contents since the
307
+ //findNestedDependencies config actually modifies
308
+ //what the contents could be.
309
+ require._cachedFileContents = {};
310
+
311
+ build(["lib/nested/build.js"]);
312
+
313
+ t.is(nol(c("lib/nested/expected-built.js")),
314
+ nol(c("lib/nested/main-built.js")));
315
+
316
+ require._buildReset();
317
+ }
318
+
319
+ ]
320
+ );
321
+ doh.run();
322
+
323
+ doh.register("nestedHas",
324
+ [
325
+ function nestedHas(t) {
326
+ file.deleteFile("lib/nestedHas/main-built.js");
327
+
328
+ //Clear the cached file contents since the
329
+ //findNestedDependencies config actually modifies
330
+ //what the contents could be.
331
+ require._cachedFileContents = {};
332
+
333
+ build(["lib/nestedHas/build.js"]);
334
+
335
+ t.is(nol(c("lib/nestedHas/expected-built.js")),
336
+ nol(c("lib/nestedHas/main-built.js")));
337
+
338
+ require._buildReset();
339
+ }
340
+
341
+ ]
342
+ );
343
+ doh.run();
344
+
345
+ doh.register("nestedHasNeedAll",
346
+ [
347
+ function nestedHasNeedAll(t) {
348
+ file.deleteFile("lib/nestedHas/main-builtNeedAll.js");
349
+
350
+ //Clear the cached file contents since the
351
+ //findNestedDependencies config actually modifies
352
+ //what the contents could be.
353
+ require._cachedFileContents = {};
354
+
355
+ build(["lib/nestedHas/buildNeedAll.js"]);
356
+
357
+ t.is(nol(c("lib/nestedHas/expected-builtNeedAll.js")),
358
+ nol(c("lib/nestedHas/main-builtNeedAll.js")));
359
+
360
+ require._buildReset();
361
+ }
362
+
363
+ ]
364
+ );
365
+ doh.run();
366
+
367
+ doh.register("nestedHasNeedB",
368
+ [
369
+ function nestedHasNeed(t) {
370
+ file.deleteFile("lib/nestedHas/main-builtNeedB.js");
371
+
372
+ //Clear the cached file contents since the
373
+ //findNestedDependencies config actually modifies
374
+ //what the contents could be.
375
+ require._cachedFileContents = {};
376
+
377
+ build(["lib/nestedHas/buildNeedB.js"]);
378
+
379
+ t.is(nol(c("lib/nestedHas/expected-builtNeedB.js")),
380
+ nol(c("lib/nestedHas/main-builtNeedB.js")));
381
+
382
+ require._buildReset();
383
+ }
384
+
385
+ ]
386
+ );
387
+ doh.run();
388
+
389
+ doh.register("nestedHasNeedC",
390
+ [
391
+ function nestedHasNeed(t) {
392
+ file.deleteFile("lib/nestedHas/main-builtNeedC.js");
393
+
394
+ //Clear the cached file contents since the
395
+ //findNestedDependencies config actually modifies
396
+ //what the contents could be.
397
+ require._cachedFileContents = {};
398
+
399
+ build(["lib/nestedHas/buildNeedC.js"]);
400
+
401
+ t.is(nol(c("lib/nestedHas/expected-builtNeedC.js")),
402
+ nol(c("lib/nestedHas/main-builtNeedC.js")));
403
+
404
+ require._buildReset();
405
+ }
406
+
407
+ ]
408
+ );
409
+ doh.run();
410
+
411
+ doh.register("nestedHasNeedD",
412
+ [
413
+ function nestedHasNeedD(t) {
414
+ file.deleteFile("lib/nestedHas/main-builtNeedD.js");
415
+
416
+ //Clear the cached file contents since the
417
+ //findNestedDependencies config actually modifies
418
+ //what the contents could be.
419
+ require._cachedFileContents = {};
420
+
421
+ build(["lib/nestedHas/buildNeedD.js"]);
422
+
423
+ t.is(nol(c("lib/nestedHas/expected-builtNeedD.js")),
424
+ nol(c("lib/nestedHas/main-builtNeedD.js")));
425
+
426
+ require._buildReset();
427
+ }
428
+
429
+ ]
430
+ );
431
+ doh.run();
432
+
433
+ doh.register("nestedHasNested",
434
+ [
435
+ function nestedHasNested(t) {
436
+ file.deleteFile("lib/nestedHas/main-builtNested.js");
437
+
438
+ //Clear the cached file contents since the
439
+ //findNestedDependencies config actually modifies
440
+ //what the contents could be.
441
+ require._cachedFileContents = {};
442
+
443
+ build(["lib/nestedHas/buildNested.js"]);
444
+
445
+ t.is(nol(c("lib/nestedHas/expected-builtNested.js")),
446
+ nol(c("lib/nestedHas/main-builtNested.js")));
447
+
448
+ require._buildReset();
449
+ }
450
+
451
+ ]
452
+ );
453
+ doh.run();
454
+
455
+ doh.register("amdefineStrip",
456
+ [
457
+ function amdefineStrip(t) {
458
+ file.deleteFile("lib/amdefine/built.js");
459
+
460
+ build(["lib/amdefine/build.js"]);
461
+
462
+ t.is(nol(c("lib/amdefine/expected.js")),
463
+ nol(c("lib/amdefine/built.js")));
464
+
465
+ require._buildReset();
466
+ }
467
+
468
+ ]
469
+ );
470
+ doh.run();
471
+
472
+ doh.register("nameInsertion",
473
+ [
474
+ function nameInsertion(t) {
475
+ file.deleteFile("lib/nameInsertion/built.js");
476
+
477
+ build(["lib/nameInsertion/build.js"]);
478
+
479
+ t.is(nol(c("lib/nameInsertion/expected.js")),
480
+ nol(c("lib/nameInsertion/built.js")));
481
+
482
+ require._buildReset();
483
+ }
484
+
485
+ ]
486
+ );
487
+ doh.run();
488
+
489
+ });