Skip to content

Commit

Permalink
Pass parentID option to resolver.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed Jan 6, 2013
1 parent f4f82f6 commit d5cff9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ Module.prototype._init = function(filename, opts) {
this.aid = rel.slice(0, rel.length - ext.length); // absolute id
this.filename = filename;
this.resolve = resolvers[opts.resolve || 'amd']({
relDir: path.dirname(this.filename)
relDir: path.dirname(this.filename),
parentID: this.id
});

Module._cache[filename] = this;
Expand Down
3 changes: 0 additions & 3 deletions lib/resolvers/amd.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ var resolve = require('amd-resolve');
module.exports = function(opts) {
opts = opts || {};

// TODO: Implement support for AMD "map" configuration, allowing the
// "parent" module to be passed as an option.

function r(id) {
return resolve.sync(id, opts);
}
Expand Down

0 comments on commit d5cff9d

Please sign in to comment.