Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Okay, the templates were installed; just hard to find.</p> <p>Add > New Item, then search for Typescript in the top-right search box. Came up with the "TypeScript file" type.</p> <p>Since Web Essentials dropped the support to compile ts files to js files, I found this link helpful: <a href="http://typescript.codeplex.com/wikipage?title=Compile-on-Save" rel="nofollow">http://typescript.codeplex.com/wikipage?title=Compile-on-Save</a> </p> <p>I didn't have to do the following first step as it was already in the csproj file.</p> <pre><code>&lt;TypeScriptCompile Include="MyFile.ts" /&gt; </code></pre> <p>After unloading the MVC project, I'd to add the following at the end of the csproj file (still within the project element):</p> <pre><code>&lt;PropertyGroup Condition="'$(Configuration)' == 'Debug'"&gt; &lt;TypeScriptTarget&gt;ES3&lt;/TypeScriptTarget&gt; &lt;TypeScriptRemoveComments&gt;false&lt;/TypeScriptRemoveComments&gt; &lt;TypeScriptSourceMap&gt;true&lt;/TypeScriptSourceMap&gt; &lt;TypeScriptModuleKind&gt;AMD&lt;/TypeScriptModuleKind&gt; &lt;/PropertyGroup&gt; &lt;PropertyGroup Condition="'$(Configuration)' == 'Release'"&gt; &lt;TypeScriptTarget&gt;ES3&lt;/TypeScriptTarget&gt; &lt;TypeScriptRemoveComments&gt;true&lt;/TypeScriptRemoveComments&gt; &lt;TypeScriptSourceMap&gt;false&lt;/TypeScriptSourceMap&gt; &lt;TypeScriptModuleKind&gt;AMD&lt;/TypeScriptModuleKind&gt; &lt;/PropertyGroup&gt; &lt;Import Project="$(VSToolsPath)\TypeScript\Microsoft.TypeScript.targets" /&gt; </code></pre> <p>MyFile.ts was in the /scripts folder. I added a script reference to the file in my view:</p> <pre><code>@section scripts { &lt;script type="text/javascript" src="~/Scripts/MyFile.js"&gt;&lt;/script&gt; } </code></pre> <p>Everything worked at this point.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload