A Cordova projects' typescript source is kept outside of the www folder. The generated map file points to source it cannot access. How do I set up a post-build event to copy the typescript source in the www folder and update the generated mapping file to enable the debugger to load the correct typescript source file when a breakpoint is hit?
Figured out the first requirement, copying the typescript source files into the www folder. Edit the .jsproj project file and add the following:
<ItemGroup>
<TypeScriptSourceFiles Include="$(ProjectDir)scripts\**\*.ts"></TypeScriptSourceFiles>
</ItemGroup>
<Target Name="AfterBuild">
<Copy SourceFiles="@(TypeScriptSourceFiles)" DestinationFiles="@(TypeScriptSourceFiles->'$(ProjectDir)www\scripts\ts\%(RecursiveDir)%(Filename)%(Extension)')"></Copy>
</Target>
Now do I just need to modify the .js.map file and update the sourceRoot attribute?
Any ideas?