The require() call for a Node.js module should probably be generated in the
PackageHeaderEmitter, where the goog.require() calls are generated.

- Josh

On Tue, Dec 1, 2015 at 5:47 PM, Alex Harui <aha...@adobe.com> wrote:

>
>
> On 12/1/15, 5:06 PM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:
> >
> >I thought you meant that you were working on the compiler to add support
> >for Node.js modules. Getting the compiler to output good code for running
> >on Node.js is something that I hope to work on soon.
> >
> >For those not familiar, Node.js modules are referenced with calls to
> >require(), like this:
> >
> >var fs = require("fs");
> >
> >It's almost like an import in ActionScript. I'm hoping to get the emitter
> >to output the right require() calls for any classes that are from CommonJS
> >modules used by Node.js. That's why I mentioned metadata.
>
> What is the source code that should generate the above call to require?
>
> -Alex
>
>

Reply via email to