ariatemplates/noder-js — pull request #9 by divdavem (2014-05-20 16:37:25+00:00)
Title: Simplifying the use of asyncRequire.

When not using relative paths, it is now possible to do:

```js
var asyncRequire = require("noder-js/asyncRequire");
asyncRequire("myModule").then(function(myModule){...})
```

The previous way still works:

```js
var asyncRequire = require("noder-js/asyncRequire").create(module);
asyncRequire("myModule").then(function(myModule){...})
```

When using relative paths, it is now possible to do:

```js
var asyncRequire = require("noder-js/asyncRequire");
asyncRequire(require.resolve("./myModule")).then(function(myModule){...});
```

The previous way still works:

```js
var asyncRequire = require("noder-js/asyncRequire").create(module);
asyncRequire("./myModule").then(function(myModule){...});
```
However, the following use case should be avoided:

```js
var asyncRequire = require("noder-js/asyncRequire");
asyncRequire("./myModule").then(function(myModule){...});
```

because then, the path is not relative to the current module, but to another (unspecified) one.