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.
If the goal is not to include the compiled *.js and *.js.map files as part of the project, what's the story about using "Publish" to get your website out? I get how it works if you build it in-place (e.g., using Azure/Kudu), but what if you're using the "Publish Website" feature, which seems to only pick up the files that are a part of the solution?
I compile multiple ts files into single js file. For now I use typescript complier fired from some text template. Do you plan to add some features to VS (plugin) to handle this type of build ?
How about opening this request on visualstudio.uservoice.com so other people can vote and VS team can actually listen to you! 8-)
PLEASE offer nesting of the generated files to the solution as a default/toggle behavior. We really want it back, (now that web essentials has dropped support due to conflicts).
@Jonathan - We use a "web application" and "publish" the DLLs and .js (and other required files) using right-click publish on the web application project. When the .js files produced by Typescript are not part of the project, they do not get published, and of course the published web application fails. Have you tried this? What am I missing?
"While we think Visual Studio 2013 provides the best TypeScript development experience..." Without the features Web Essentials provided this is demonstrably not true anymore. You guys really need to rethink the decision to have Mads drop TypeScript support.
@Tristan/@karl - we're working on a user interface for setting project properties. Until then, you can unload and edit the project and add a TypeScriptOutFile to the build settings (you can add it under the under Debug/Release build settings that have TypeScriptXXXX names)
@Mitch - you can use the "Show All Files" in the solution explorer to see the .js files. Unlike nesting, this also works if you use the options to compile multiple .ts files into a single .js file (like the steps above)
@Jonathan Turner [MS] I think you are missing the point, I realize the files are still physically on the disk. What I am saying is that unless the support for Typescript natively includes the nesting of the files as an options there is little chance our team will be able to adopt it due to workflow issues and the need for changing our deployment processes. Please keep in mind that just because its the way you believe it should be done, does not mean its the way it is done. It is a very simple addition and I would venture a guess that you could just grab the code to do it from Mads...
We're well on our way to 1.0! What a great product; you guys are doing a good job. I am a little bummed that one of my machines still has the js file "associated" (a/k/a "nested") with the NEW (not default Greeter) ts file even after all the vs 2012 updates, nuget updates and ts updates (0.9.1.1) I can find. What is it that changed to not associate the js anymore? Can I edit my csproj or something? must i use vs2013 with 9.1.1? BTW.. Who is "Mads"??
@Mitch - Can you give more information? What is the scenario you are trying to use this nesting?
@Gary - Was the project you're using made with a version before 0.9.1? I believe it's up to the project.
If you still see *.js files nested under your *.ts files, then your old project files probably contain something like:
To bring them into the 0.9.1+ style TypeScript, the above should be replaced with:
Thanks Jonathan. Just reiterating... this is an old csproj but a new ts. my steps: create csproj, add a ts (it is nested as was expected then), update vs and ts, add a new ts, it is still nested. are you suggesting i edit my csproj whenever i add a new ts?
btw also reiterating how much i am looking forward to using this. you guys are doing a great job though sometimes these comments even my own hardly ever say so.
let me clarify. in an old solution, i added a new "html project with typescript", the default app.ts has the unnested csproj line as you mention. added a new ts file. the new ts file has both a typescript compile element and a content include element.
wondering what is shaping up to be the best practice. Will the "html project with ts" continue to be a thing or I think I read something about making the ts more part of the normal web projects. if i was starting with an old solution, even an old web app csproj, what is the recommended way to add a ts file and have it compiled on save and/or at build time, and also have the js file be "published"? I'm guessing i might have to add something like a target to my csproj unless that automatically happens when i add the first ts. anyway.. what is the recommended way to do what i've laid out? i.e., old sln, old csproj, new ts, compile to js, publish. i understand if this is still up in the air if you could let me know that's the case.