I was a little hesitant to use Grunt at first, kind of seems like a backwards step when you used to Visual Studio doing everything for you. Though I am guessing they had to get away from using Visual Studio for a everything since ASP.NET 5 is going to be cross platform and not reliant on Visual Studio.
If you set up a Grunt or Gulp task you will still see errors in the Errors List. It is just coming from Visual Studio.
I used grunt-typescript to compile and output the JavaScript to one file. I also had to install typescript itself. Once you have them installed via the packages.json file you have to add something like this to your gruntfile.js
typescript: {
base: {
src: ['path/to/typescript/files/**/*.ts'],
dest: 'where/you/want/your/js/file.js',
options: {
module: 'amd', //or commonjs
}
}
}
and
grunt.loadNpmTasks("grunt-typescript");
I ended up pointing the src to my TypeScript reference file.
You can then get it to run in post build via the Visual Studio Task Runner Explorer. Though what is even better is set up a watch task on all the TypeScript files to start the build, it is built into grunt-typescript but I used grunt-contrib-watch to do it as I am also watching Sass files...etc. I used the watch task, as you don't need to manually build the project anymore with ASP.NET 5.
Also if haven't tried TSD, have a look it is really good to find and download the definition files. It feels better using it than NuGet to get them, just as bower seems better than NuGet for JavaScript libraries.