ForbesLindesay/rfileify — pull request #2 by mjpizz (2013-06-02 23:53:23+00:00)
Title: Fix for variable assignments

Previously, `rfileify` would fail depending on how the "rfile" module was required. For example:

```js
// Works :)
var foo = require("rfile");

// Fails :(
var foo;
foo = require("rfile");
```

Turns out the parser was only looking for "VariableDeclarator" (e.g. the first example), and that failing example is actually an "AssignmentExpression".

Supporting assignments is particularly important for coffeescript and minified code, where the variable declarations end up separate from their assignments. Simple fix, plus tests :smiley: