ForbesLindesay/rfileify — pull request #3 by mjpizz (2013-06-24 02:12:49+00:00)
Title: Support non-inline transforms

There are a couple limitations when inlining `rfile` contents:

1. Browserify (particularly [watchify](https://github.com/substack/watchify)) is not aware of changes to the included file.
2. Content strings will be duplicated if the same file is included twice.

This change allows non-inline transforms using the following syntax:

```javascript
b = browserify()
b.transform(rfileify({inline: false}));
```

For example, if this is the original:

```javascript
var rfile = require("rfile");
var foo = rfile("./foo.html");
```

The output with `{inline: false}` will look like:

```javascript
var rfile = undefined;
var foo = require("./foo.html"); // file will be picked up by browserify now
```

...and **foo.html** will look like this in the browserify output lookup:

```javascript
// foo.html
module.exports = "

hello world

"
```