Last active
August 29, 2015 13:59
-
-
Save yukitos/10523927 to your computer and use it in GitHub Desktop.
MSBuild snippet to build TypeScript sourcemap files in F# MVC 5 project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PropertyGroup> | |
<!-- snip --> | |
<TypeScriptToolsVersion>1.0</TypeScriptToolsVersion> | |
</PropertyGroup> | |
<Target Name="BeforeBuild"> | |
<MSBuild.ExtensionPack.FileSystem.File TaskAction="Replace" RegexPattern="<dependentAssembly>([\s]+.)<assemblyIdentity name="FSharp\.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" \/>([\s\S]+?)<\/dependentAssembly>" RegexOptionList="IgnoreCase|Singleline" Replacement="<dependentAssembly>
 <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
 <bindingRedirect oldVersion="0.0.0.0-$(TargetFSharpCoreVersion)" newVersion="$(TargetFSharpCoreVersion)"/>
 </dependentAssembly>" Files="web.config" /> | |
<ItemGroup> | |
<TSFiles Include="@(None);@(TypeScriptCompile)" Condition=" '%(Extension)' == '.ts' " /> | |
</ItemGroup> | |
<Exec Command=""$(PROGRAMFILES)\Microsoft SDKs\TypeScript\$(TypeScriptToolsVersion)\tsc.exe" "%(TSFiles.Identity)" --sourcemap" /> | |
</Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment