Sau*_*ory 6 visual-studio-2012 typescript tsc
使用tsc命令就像运行一样简单:
tsc --out all.js js/*.ts
Run Code Online (Sandbox Code Playgroud)
在构建项目时,如何配置Visual Studio来执行此操作?
刚刚收到。添加这一行:
<Exec Command="tsc --out all.js @(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
Run Code Online (Sandbox Code Playgroud)
到您的或文件BeforeBuild的目标,如下所示:.csproj.vbproj
<Target Name="BeforeBuild">
<Message Text="Compiling TypeScript files" />
<Message Text="Executing tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
<Exec Command="tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
<Exec Command="tsc --out all.js @(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
</Target>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3426 次 |
| 最近记录: |