Search code examples
typescriptjake

How do I invoke the TypeScript compiler from Jake?


If I wanted to invoke jshint from a jake script, I'd do something like this:

var jshint = require("jshint").JSHINT;
var pass = jshint(sourceCode, options, globals);

I'd like to do something similar with tsc - but does anyone know how to do this? The documentation only tells you how to run this from the command line, and not how to invoke it programmatically.


Solution

  • I don't know anything about jake. However, the typescript compiler currently has no public interface and hence I believe you cannot call it from jake. There is an issue filed for this at codeplex. I'd expect it to be fixed soon.