Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Change require.register signature. Closes gh-30. #52

Closed
wants to merge 2 commits into from

2 participants

@paulmillr

@visionmedia I think builder is now broken because this wasn’t merged and component-require was updated with new signature

@tj
tj commented

oh damn I forgot there was a PR for this I did it manually

@tj tj closed this
@paulmillr paulmillr deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
4 lib/builder.js
@@ -792,11 +792,11 @@ function register(builder, file, js){
: builder.name + '/' + file;
if (builder.sourceUrls) {
- return 'require.register("' + file + '", Function("module, exports, require",\n'
+ return 'require.register("' + file + '", Function("exports, require, module",\n'
+ JSON.stringify(js + '//@ sourceURL=' + file)
+ '\n));';
} else {
- return 'require.register("' + file + '", function(module, exports, require){\n'
+ return 'require.register("' + file + '", function(exports, require, module){\n'
+ js
+ '\n});';
}
View
4 test/fixtures/hello-ignore.js
@@ -1,7 +1,7 @@
-require.register("hello/foo.js", function(module, exports, require){
+require.register("hello/foo.js", function(exports, require, module){
module.exports = 'foo';
});
-require.register("hello/bar.js", function(module, exports, require){
+require.register("hello/bar.js", function(exports, require, module){
module.exports = 'bar';
});
require.alias("component-emitter/index.js", "hello/deps/emitter/index.js");
View
6 test/fixtures/hello-js.js
@@ -1,9 +1,9 @@
-require.register("component-emitter/index.js", function(module, exports, require){
+require.register("component-emitter/index.js", function(exports, require, module){
module.exports = 'emitter';
});
-require.register("hello/foo.js", function(module, exports, require){
+require.register("hello/foo.js", function(exports, require, module){
module.exports = 'foo';
});
-require.register("hello/bar.js", function(module, exports, require){
+require.register("hello/bar.js", function(exports, require, module){
module.exports = 'bar';
});
View
6 test/fixtures/hello-sourceurl-js.js
@@ -1,9 +1,9 @@
-require.register("component-emitter/index.js", Function("module, exports, require",
+require.register("component-emitter/index.js", Function("exports, require, module",
"module.exports = 'emitter';//@ sourceURL=component-emitter/index.js"
));
-require.register("hello/foo.js", Function("module, exports, require",
+require.register("hello/foo.js", Function("exports, require, module",
"module.exports = 'foo';//@ sourceURL=hello/foo.js"
));
-require.register("hello/bar.js", Function("module, exports, require",
+require.register("hello/bar.js", Function("exports, require, module",
"module.exports = 'bar';//@ sourceURL=hello/bar.js"
));
View
6 test/fixtures/hello.js
@@ -1,10 +1,10 @@
-require.register("component-emitter/index.js", function(module, exports, require){
+require.register("component-emitter/index.js", function(exports, require, module){
module.exports = 'emitter';
});
-require.register("hello/foo.js", function(module, exports, require){
+require.register("hello/foo.js", function(exports, require, module){
module.exports = 'foo';
});
-require.register("hello/bar.js", function(module, exports, require){
+require.register("hello/bar.js", function(exports, require, module){
module.exports = 'bar';
});
require.alias("component-emitter/index.js", "hello/deps/emitter/index.js");
View
6 test/fixtures/ignore.js
@@ -1,9 +1,9 @@
-require.register("component-jquery/index.js", function(module, exports, require){
+require.register("component-jquery/index.js", function(exports, require, module){
module.exports = 'jquery';
});
-require.register("component-popover/index.js", function(module, exports, require){
+require.register("component-popover/index.js", function(exports, require, module){
module.exports = 'popover';
});
-require.register("component-dialog/index.js", function(module, exports, require){
+require.register("component-dialog/index.js", function(exports, require, module){
module.exports = 'dialog';
});
View
6 test/fixtures/lookups-deep-js.js
@@ -1,10 +1,10 @@
-require.register("component-jquery/index.js", function(module, exports, require){
+require.register("component-jquery/index.js", function(exports, require, module){
module.exports = 'jquery';
});
-require.register("component-dialog/index.js", function(module, exports, require){
+require.register("component-dialog/index.js", function(exports, require, module){
module.exports = 'dialog';
});
-require.register("deep/index.js", function(module, exports, require){
+require.register("deep/index.js", function(exports, require, module){
module.exports = 'deeper'
});
require.alias("component-dialog/index.js", "deep/deps/dialog/index.js");
View
10 test/fixtures/lookups-deep2-js.js
@@ -1,18 +1,18 @@
-require.register("component-jquery/index.js", function(module, exports, require){
+require.register("component-jquery/index.js", function(exports, require, module){
module.exports = 'jquery';
});
-require.register("component-dialog/index.js", function(module, exports, require){
+require.register("component-dialog/index.js", function(exports, require, module){
module.exports = 'dialog';
});
-require.register("component-inherit/index.js", function(module, exports, require){
+require.register("component-inherit/index.js", function(exports, require, module){
module.exports = 'inherit';
});
-require.register("animal/index.js", function(module, exports, require){
+require.register("animal/index.js", function(exports, require, module){
var inherit = require('inherit');
module.exports = 'animal';
});
-require.register("deep2/index.js", function(module, exports, require){
+require.register("deep2/index.js", function(exports, require, module){
module.exports = 'deeper'
});
require.alias("component-dialog/index.js", "deep2/deps/dialog/index.js");
View
12 test/fixtures/lookups-deep3-js.js
@@ -1,21 +1,21 @@
-require.register("deep2/index.js", function(module, exports, require){
+require.register("deep2/index.js", function(exports, require, module){
module.exports = 'deeper'
});
-require.register("component-jquery/index.js", function(module, exports, require){
+require.register("component-jquery/index.js", function(exports, require, module){
module.exports = 'jquery';
});
-require.register("component-dialog/index.js", function(module, exports, require){
+require.register("component-dialog/index.js", function(exports, require, module){
module.exports = 'dialog';
});
-require.register("component-inherit/index.js", function(module, exports, require){
+require.register("component-inherit/index.js", function(exports, require, module){
module.exports = 'inherit';
});
-require.register("animal/index.js", function(module, exports, require){
+require.register("animal/index.js", function(exports, require, module){
var inherit = require('inherit');
module.exports = 'animal';
});
-require.register("deep3/index.js", function(module, exports, require){
+require.register("deep3/index.js", function(exports, require, module){
module.exports = 'deeper'
});
require.alias("deep2/index.js", "deep3/deps/deep2/index.js");
Something went wrong with that request. Please try again.