termi / es6-transpiler

Tomorrow's JavaScript syntax today
Other
216 stars 18 forks source link

Empty output on referencing classes from other files #70

Closed steelbrain closed 9 years ago

steelbrain commented 9 years ago

This is the JS code that compiles it

#!/usr/bin/nodejs
var es6 = require("/usr/lib/node_modules/es6-transpiler/build/es5/es6-transpiler.js");
var fs = require("fs");
var src = fs.readFileSync(process.argv[2]).toString();
src = es6.run({src:src}).src;
console.log(src)

The first js file is

var a = new OtherClass()

The second js file is

class OtherClass{

}

upon compiling the first file the output is empty, however it should be the same as input.

steelbrain commented 9 years ago

More than six months passed and no reply from the author, gonna close it.