Permalink
Browse files

removed extraneous ; in compilation

  • Loading branch information...
1 parent 1fb4806 commit 63a3a1044672cd2e1e0500e2253ddf5bd27e9601 weepy committed Dec 6, 2011
View
@@ -107,8 +107,11 @@ Notes
* require.async works seemlessly with require, so if a dependency is already available, require.async will return immediately with no xhr
+* CoffeeScript lovers:
+
Test
----
+npm install should glob
expresso
View
@@ -139,7 +139,7 @@ compile.prototype.toString = function() {
module = module.replace(/\.coffee$/, ".js")
}
- js += wrap(module, txt) + ";\n\n"
+ js += wrap(module, txt) + "\n"
}
return js
}
@@ -158,7 +158,7 @@ function mkDirTree(_path) {
function wrap(file, text) {
- return "define('" + file + "', [], function(module, exports, require) {\n// start module: " + file + "\n\n" + text + "\n\n// end module: "+ file +"\n});\n"
+ return "define('" + file + "', [], function(module, exports, require) {\n" + text + "\n}); // end module: "+ file +"\n"
}
module.exports = compile
@@ -1,7 +1,3 @@
define('./pi.js', [], function(module, exports, require) {
-// start module: ./pi.js
-
module.exports = 3
-
-// end module: ./pi.js
-});
+}); // end module: ./pi.js
@@ -1,26 +1,14 @@
define('./pi.js', [], function(module, exports, require) {
-// start module: ./pi.js
-
module.exports = 3
-
-// end module: ./pi.js
-});
-;
+}); // end module: ./pi.js
define('./shape.js', [], function(module, exports, require) {
-// start module: ./shape.js
-
module.exports = function Shape() {
}
-
-// end module: ./shape.js
-});
-;
+}); // end module: ./shape.js
define('./shapes/circle.js', [], function(module, exports, require) {
-// start module: ./shapes/circle.js
-
var pi = require("../pi"),
shape = require("../shape")
@@ -34,8 +22,5 @@ Circle.prototype.area = function() {
return pi * this.radius * this.radius
}
module.exports = Circle
-
-// end module: ./shapes/circle.js
-});
-;
+}); // end module: ./shapes/circle.js
@@ -1,9 +1,5 @@
define('./shape.js', [], function(module, exports, require) {
-// start module: ./shape.js
-
module.exports = function Shape() {
}
-
-// end module: ./shape.js
-});
+}); // end module: ./shape.js
@@ -1,6 +1,4 @@
define('./shapes/circle.js', [], function(module, exports, require) {
-// start module: ./shapes/circle.js
-
var pi = require("../pi"),
shape = require("../shape")
@@ -14,6 +12,4 @@ Circle.prototype.area = function() {
return pi * this.radius * this.radius
}
module.exports = Circle
-
-// end module: ./shapes/circle.js
-});
+}); // end module: ./shapes/circle.js
@@ -1,7 +1,3 @@
define('./single.js', [], function(module, exports, require) {
-// start module: ./single.js
-
module.exports = "single!"
-
-// end module: ./single.js
-});
+}); // end module: ./single.js
@@ -1,18 +1,8 @@
define('user_alt/admin/index.js', [], function(module, exports, require) {
-// start module: user_alt/admin/index.js
-
module.exports = "admin"
-
-// end module: user_alt/admin/index.js
-});
-;
+}); // end module: user_alt/admin/index.js
define('user_alt/index.js', [], function(module, exports, require) {
-// start module: user_alt/index.js
-
module.exports = require("./admin")
-
-// end module: user_alt/index.js
-});
-;
+}); // end module: user_alt/index.js
View
@@ -3,12 +3,12 @@ var brequire = require("brequire"),
fs = require("fs")
exports.test_construct = function() {
- var br = brequire("./")
+ var br = brequire.module("./")
is.ok(br instanceof brequire)
}
exports.test_relative = function() {
- var br = brequire("./test/shape")
+ var br = brequire.module("./test/shape")
br.root.should.eql(__dirname + "/shape")
br._files().should.eql(["pi.js", "shape.js", "shapes/circle.js"])
@@ -25,7 +25,7 @@ exports.test_single_file = function() {
}
exports.test_paths = function() {
- var br = brequire("./test/shape").search("*.js","shapes/*.js")
+ var br = brequire.module("./test/shape").search("*.js","shapes/*.js")
br.root.should.eql(__dirname + "/shape")
// br.paths.should.eql(["*.js"])
br._files().should.eql(["pi.js", "shape.js", "shapes/circle.js"])

0 comments on commit 63a3a10

Please sign in to comment.