zenparsing / es6now

ECMAScript 6 to 5 Compiler and Runtime Environment
MIT License
29 stars 2 forks source link

Export runtime to module? #20

Closed Bartvds closed 10 years ago

Bartvds commented 10 years ago

When exporting many files with module: true the es6now runtime could maybe be a require()-able module instead of adding it to every file?

Maybe even extract it and move it to it's own npm module? Could be neat.

Just a thought, not sure if good idea.

zenparsing commented 10 years ago

You can currently generate just the runtime by doing this:

var runtimeText = es6now.translate("", { runtime: true });

Does that work?

If it's a common thing we could have a shortcut like:

var runtimeText = es6now.runtime();
zenparsing commented 10 years ago

Closing this for now - if there's a need for a shortcut we can add it later.