[英]How to get Visual Studio to automatically include JS files compiled from Typescript?
I've just began with Typescript in Visual Studio. 我刚刚从Visual Studio中的Typescript开始。 I notice that when I save the TS files, Visual Studio compiles the JS files and they are resided in the same folder as the TS files.
我注意到在保存TS文件时,Visual Studio会编译JS文件,它们与TS文件位于同一文件夹中。 But Visual Studio does not reflect those compiled JS files.
但是Visual Studio不会反映那些已编译的JS文件。 In other words, Visual Studio did not include those files into the project.
换句话说,Visual Studio不会将那些文件包含到项目中。 The JS files are only visible when I open the folder in Windows Explorer.
仅当我在Windows资源管理器中打开文件夹时,JS文件才可见。
And even if I manually include those js files into Visual Studio, they don't appear under the TS files as a subfile of theirs, like they are linked. 而且,即使我手动将这些js文件包括在Visual Studio中,它们也不会作为它们的子文件出现在TS文件下,就像它们被链接一样。
How can I get Visual Studio to include the JS files compiled from the TS files automatically? 如何使Visual Studio自动包含从TS文件编译的JS文件?
You can use VSCommand plugin http://vscommands.squaredinfinity.com . 您可以使用VSCommand插件http://vscommands.squaredinfinity.com 。 This plugins adds many useful commands and one of them is the Group items in the Solution Explorer right click menu.
该插件添加了许多有用的命令,其中之一是解决方案资源管理器右键菜单中的“组”项。
I use that and then WebEssential to minimize the map the result js files. 我使用它,然后使用WebEssential来最小化地图结果js文件。
Visual Studio的进步意味着,从VS2015开始,尽管不在项目中,但仍会部署生成的JS文件,并且将TS文件拖到编辑器中的网页上将插入引用生成的JS文件的链接标记。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.