timothyklim / typescript-ruby

Ruby TypeScript Compiler
MIT License
6 stars 3 forks source link

typescript compiler doesn't work properly in execjs #1

Open antage opened 12 years ago

antage commented 12 years ago

Typescript compiler (TypeScript.CodeResolver class for example) requires IO class (io.ts) that is defined for Node.js and JScript only. ExecJS hides all CommonJS functions for Node.js so we can't compile IO class for Node.js.

I propose to drop ExecJS and use Node.js directly to run compiler.

Jupiterrr commented 11 years ago

I think it could be done with some minor changes to ExecJS. You can force ExecJS to use Node.js. ENV['EXECJS_RUNTIME'] = 'Node' And when you change this line Typescript should have access to everything. I'm not sure if I'm missing a point.