Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Adding `define` function, to allow requiring modules coded for browsers. #1170

Closed
wants to merge 1 commit into from

1 participant

@Gozala

Implements change proposed in following thread: https://groups.google.com/forum/#!topic/nodejs-dev/DJz3OYGRnmg

@Gozala

Closing in favor of #1173 that is more feature complete than this one.

Thanks!

@Gozala Gozala closed this
@isaacs isaacs referenced this pull request from a commit in isaacs/node
@isaacs isaacs AMD compatibility for node, with docs and tests
Closes #1173
Closes #1170
41c143c
@elarkin elarkin referenced this pull request from a commit in elarkin/node
@isaacs isaacs AMD compatibility for node, with docs and tests
Closes #1173
Closes #1170
9967c36
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.
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/node.js
View
3  src/node.js
@@ -436,7 +436,8 @@
};
NativeModule.wrapper = [
- '(function (exports, require, module, __filename, __dirname) { ',
+ '(function (exports, require, module, __filename, __dirname) { ' +
+ 'function define(factory) { factory(require, exports, module); } ',
'\n});'
];
Something went wrong with that request. Please try again.