grunt-ts/grunt-ts — pull request #103 by chexxor (2014-05-19 06:03:14+00:00)
Title: Add 'failGruntOnTypeErrors' option. Improve build result handling.

Yo - I was quite confused using grunt-ts when first starting on adding TypeScript to my project. Why? I did `grunt ts:build`, and it said it failed due to type errors. This is odd because every JavaScript file should be able to pass through the TypeScript compiler. So, why was grunt-ts saying my JavaScript can't pass through the `tsc` compiler?

I did some looking, and it appears that the grunt-ts plugin has non-existent interpretation of the results of the `tsc` app.

if (!result || result.code) {
grunt.log.error('Compilation failed'.red);
}

So, I decided to throw my hand at a slightly better interpretation of those `tsc` results. Maybe I'm totally wrong here, but I tested this change in my program, and I like what I see.

With this change, a syntax error will always fail the build, but only type errors will not. If we *do* want the build to fail on type errors, we can set the `failGruntOnTypeErrors` option to `true` in our Gruntfile.

What do you think?

Btw - you've got some nice code here! Really makes it a pleasure to dive in and help out.