marcello3d/node-ractify — pull request #11 by thomsbg (2014-09-11 17:02:15+00:00)
Title: Translate import declarations into calls to require() in beforeInit.

Import hrefs are assumed to be relative to the current file, and so
the call to require has `./` prepended. e.g.

require('./test.ract');

If a beforeInit callback was specified in the component, it will be
called after the sub-components have been set into options. See the
new test case for an example.

Also, I refactored things slightly to branching on `if (component.script)`. This causes `var component = module` to always be output, and the use of `component.exports` over just `exports`. Please let me know if that's a problem.