简体   繁体   English

如何在Visual Studio 2013中设置打字稿开发工作流程?

[英]How to setup typescript development workflow in visual studio 2013?

I am using the typescript 0.9.1.1 in visual studio 2013 preview. 我在Visual Studio 2013预览版中使用打字稿0.9.1.1。 I have a couple of questions about typescript development workflow. 关于打字稿开发工作流程,我有几个问题。

1: How to let visual studio compile all typescript files into only one javascript source file. 1:如何让Visual Studio将所有打字稿文件编译成一个JavaScript源文件。

2: How to generate the minified javascript file? 2:如何生成缩小的javascript文件?

3: Could we have google closure "exportsymbol" feature in the typescript? 3:我们可以在打字稿中使用Google闭包“ exportsymbol”功能吗? If I want to all symbols in my_public_api.ts is kept as they are and all other symbol names should be obfuscated. 如果我希望将my_public_api.ts中的所有符号保持原样,则所有其他符号名称都应进行混淆。

1.) How to let visual studio compile all typescript files into only one javascript source file. 1.)如何让Visual Studio将所有打字稿文件编译成一个JavaScript源文件。

You need to add the section <TypeScriptOutFile>Some.js</TypeScriptOutFile> to your project file manually. 您需要将<TypeScriptOutFile>Some.js</TypeScriptOutFile>手动添加到您的项目文件中。

2) How to generate the minified javascript file? 2)如何生成缩小的javascript文件?

TypeScript compiler cannot do this. TypeScript编译器无法执行此操作。 Use uglify.js OR google closure OR WebEssentials can do this for you. 使用uglify.js或google闭包或WebEssentials可以为您完成此操作。

3.) Could we have google closure "exportsymbol" feature in the typescript? 3.)我们可以在打字稿中使用Google闭包“ exportsymbol”功能吗? If I want to all symbols in my_public_api.ts is kept as they are and all other symbol names should be obfuscated. 如果我希望将my_public_api.ts中的所有符号保持原样,则所有其他符号名称都应进行混淆。

TypeScript compiler does not do any minification / obfuscation. TypeScript编译器不做任何缩小/混淆处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM