简体   繁体   English

将多个Typescript文件编译为一个javascript文件

[英]Compiling multiple Typescript files into one javascript file

I am using tsc.exe manually, is there a way for me to basically pass it a load of Typescript files under a root namespace and just compile it to a single namespace encapsulated js file? 我正在手动使用tsc.exe,有​​没有办法让我基本上在根名称空间下将它的Typescript文件传递给它,然后将其编译为单个名称空间封装的js文件?

I am thinking like how you have a .net dll which contains the root namespace and all children. 我在想像您如何拥有一个包含根名称空间和所有子级的.net dll。

I managed to find some links after posting this: 发布此内容后,我设法找到了一些链接:

TypeScript compiling as a single JS file http://www.codebelt.com/typescript/typescript-compiler-commands/ 将TypeScript编译为单个JS文件 http://www.codebelt.com/typescript/typescript-compiler-commands/

Both of which helpped me, the actual answer is: 两者都对我有所帮助,实际答案是:

tsc.exe --out some_file.js some_ts_file.ts some_other_ts_file.ts

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

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