Adding TypeScript to a Project
Adding Declaration Files
We’ve released the TypeScript compiler and language as open source to make it easy for the community to build great tools. While we think Visual Studio 2013 provides the best TypeScript development experience, there are a number of other editors with TypeScript support available, including Eclipse, Web Storm, Sublime Text, emacs, and vim.
We hope that these features make it seamless to use TypeScript in ASP.NET projects in Visual Studio 2013. As always, send us feedback on the TypeScript CodePlex page.
The adding TypeScript to a project section doesn't seem to work on Windows Store App projects unfortunately :(
There's no "TypeScript file" available in the "New Item..." menu.
I really enjoy the new debugging features and the typing integration. The only thing I truly miss from Web Essentials was the split-screen editor support. While I can manually take the .ts file and split the screen with the .js file, you always get the prompt to "reload file from disk" which slows things down. When doing user groups, offering training and evangelizing TypeScript, the split-screen view is what really sold people and help them understand what's going on. Hopefully either the VS team or Mads can add back the split-screen feature because I sorely miss it. Right now I'm looking at rolling back to VS 2012 for demos.
Mads Kristensen is the guy behind Web Essentials plugin and the Program Manager at the Microsoft Web Platform.
@Craig - we currently don't have Windows Store application support in place, but that is definitely on our radar.
@Sid - I believe you can turn off that warning using the "Auto-load changes, if saved" checkbox under Tools/Options/Environment/Documents.
Right, if you want to use the old style of projects, you would need to set up the project in the way earlier versions did it. The newer style is the one we're planning to support going forward, as it's simpler and more flexible to not treat the .js file(s) as part of the project. No doubt this will evolve as we support more styles of JS projects.
For ASP.NET projects, you can also create a normal ASP.NET web application project (not a website project), and when you add a TypeScript file to it, we will automatically update the project to build the TypeScript. This lightweight style of upgrade will probably be how we go forward, so you don't have to worry as much about editing projects manually.
As for publishing, it's my understanding in talking with the dev who worked on this that the .js files generated by the msbuild step should be included as part of the publish. This should go for both the HTML Application and the ASP.NET web application projects that are updated with TypeScript. If there are situations you're finding where this isn't the case, please let us know via the issue tracker: typescript.codeplex.com/.../basic
We are using Typescript in production code since version 0.8 and we found following solution as the most practicable.
The generated .js and map Files are included in the project but are not included in the source control, because the compiler and the automated build is not supposed to check out and change files on every build.
The problem is also mentioned here:
Great product! Love using it for Dynamics CRM development, and look forward to the 1.0 milestone!