Closed
Description
I can access to module information by using JSX.require() function from JS code, but there is no way to get primary source file name (it was passed to JSX compiler).
If I can get primary source file name, I can write custom bootstrap code easily.
For example, just import following code, you can export all export classes and use as standard CommonJS code.
native class CommonJSExporter {
} = '''
var module = JSX.require(JSX.getPrimarySourceFile());
for (var key in module)
{
if (key.match(/^[a-zA-Z0-9]+$/))
{
exports[key] = module[key];
}
}
'''