Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

removed extraneous ; in compilation

  • Loading branch information...
commit 63a3a1044672cd2e1e0500e2253ddf5bd27e9601 1 parent 1fb4806
weepy authored
3  README.md
Source Rendered
@@ -107,8 +107,11 @@ Notes
107 107
108 108 * require.async works seemlessly with require, so if a dependency is already available, require.async will return immediately with no xhr
109 109
  110 +* CoffeeScript lovers:
  111 +
110 112
111 113 Test
112 114 ----
113 115
  116 +npm install should glob
114 117 expresso
4 lib/brequire.js
@@ -139,7 +139,7 @@ compile.prototype.toString = function() {
139 139 module = module.replace(/\.coffee$/, ".js")
140 140 }
141 141
142   - js += wrap(module, txt) + ";\n\n"
  142 + js += wrap(module, txt) + "\n"
143 143 }
144 144 return js
145 145 }
@@ -158,7 +158,7 @@ function mkDirTree(_path) {
158 158
159 159
160 160 function wrap(file, text) {
161   - return "define('" + file + "', [], function(module, exports, require) {\n// start module: " + file + "\n\n" + text + "\n\n// end module: "+ file +"\n});\n"
  161 + return "define('" + file + "', [], function(module, exports, require) {\n" + text + "\n}); // end module: "+ file +"\n"
162 162 }
163 163
164 164 module.exports = compile
6 test/browser/lib/pi.js
... ... @@ -1,7 +1,3 @@
1 1 define('./pi.js', [], function(module, exports, require) {
2   -// start module: ./pi.js
3   -
4 2 module.exports = 3
5   -
6   -// end module: ./pi.js
7   -});
  3 +}); // end module: ./pi.js
21 test/browser/lib/shape.bundle.js
... ... @@ -1,26 +1,14 @@
1 1 define('./pi.js', [], function(module, exports, require) {
2   -// start module: ./pi.js
3   -
4 2 module.exports = 3
5   -
6   -// end module: ./pi.js
7   -});
8   -;
  3 +}); // end module: ./pi.js
9 4
10 5 define('./shape.js', [], function(module, exports, require) {
11   -// start module: ./shape.js
12   -
13 6 module.exports = function Shape() {
14 7
15 8 }
16   -
17   -// end module: ./shape.js
18   -});
19   -;
  9 +}); // end module: ./shape.js
20 10
21 11 define('./shapes/circle.js', [], function(module, exports, require) {
22   -// start module: ./shapes/circle.js
23   -
24 12 var pi = require("../pi"),
25 13 shape = require("../shape")
26 14
@@ -34,8 +22,5 @@ Circle.prototype.area = function() {
34 22 return pi * this.radius * this.radius
35 23 }
36 24 module.exports = Circle
37   -
38   -// end module: ./shapes/circle.js
39   -});
40   -;
  25 +}); // end module: ./shapes/circle.js
41 26
6 test/browser/lib/shape.js
... ... @@ -1,9 +1,5 @@
1 1 define('./shape.js', [], function(module, exports, require) {
2   -// start module: ./shape.js
3   -
4 2 module.exports = function Shape() {
5 3
6 4 }
7   -
8   -// end module: ./shape.js
9   -});
  5 +}); // end module: ./shape.js
6 test/browser/lib/shapes/circle.js
... ... @@ -1,6 +1,4 @@
1 1 define('./shapes/circle.js', [], function(module, exports, require) {
2   -// start module: ./shapes/circle.js
3   -
4 2 var pi = require("../pi"),
5 3 shape = require("../shape")
6 4
@@ -14,6 +12,4 @@ Circle.prototype.area = function() {
14 12 return pi * this.radius * this.radius
15 13 }
16 14 module.exports = Circle
17   -
18   -// end module: ./shapes/circle.js
19   -});
  15 +}); // end module: ./shapes/circle.js
6 test/browser/lib/single/single.js
... ... @@ -1,7 +1,3 @@
1 1 define('./single.js', [], function(module, exports, require) {
2   -// start module: ./single.js
3   -
4 2 module.exports = "single!"
5   -
6   -// end module: ./single.js
7   -});
  3 +}); // end module: ./single.js
14 test/browser/lib/user_alt.bundle.js
... ... @@ -1,18 +1,8 @@
1 1 define('user_alt/admin/index.js', [], function(module, exports, require) {
2   -// start module: user_alt/admin/index.js
3   -
4 2 module.exports = "admin"
5   -
6   -// end module: user_alt/admin/index.js
7   -});
8   -;
  3 +}); // end module: user_alt/admin/index.js
9 4
10 5 define('user_alt/index.js', [], function(module, exports, require) {
11   -// start module: user_alt/index.js
12   -
13 6 module.exports = require("./admin")
14   -
15   -// end module: user_alt/index.js
16   -});
17   -;
  7 +}); // end module: user_alt/index.js
18 8
6 test/test_all.js
@@ -3,12 +3,12 @@ var brequire = require("brequire"),
3 3 fs = require("fs")
4 4
5 5 exports.test_construct = function() {
6   - var br = brequire("./")
  6 + var br = brequire.module("./")
7 7 is.ok(br instanceof brequire)
8 8 }
9 9
10 10 exports.test_relative = function() {
11   - var br = brequire("./test/shape")
  11 + var br = brequire.module("./test/shape")
12 12 br.root.should.eql(__dirname + "/shape")
13 13 br._files().should.eql(["pi.js", "shape.js", "shapes/circle.js"])
14 14
@@ -25,7 +25,7 @@ exports.test_single_file = function() {
25 25 }
26 26
27 27 exports.test_paths = function() {
28   - var br = brequire("./test/shape").search("*.js","shapes/*.js")
  28 + var br = brequire.module("./test/shape").search("*.js","shapes/*.js")
29 29 br.root.should.eql(__dirname + "/shape")
30 30 // br.paths.should.eql(["*.js"])
31 31 br._files().should.eql(["pi.js", "shape.js", "shapes/circle.js"])

0 comments on commit 63a3a10

Please sign in to comment.
Something went wrong with that request. Please try again.