Compiling Typescript to a single output file?
When using a Typescript watcher, there doesn't seem to be a way to concatenate all the files down into a single output file.
In the command line, I believe you'd do something like:
tsc -out output.js filea.ts fileb.ts
Can we set up IntelliJ Idea to do this as well?
请先登录再写评论。
Hi Alex,
just in the same way - by passing '-out' option to tsc in File Watcher arguments
If your main.ts file references other project files directly or indirectly via <reference path> references, the following file watcher settings will result in joining all .ts files into a single main.js:
'Track only root files' ON
Arguments: -sourcemap $FileName$ --out $FileNameWithoutExtension$.js
Working directory: $FileDir$
Output paths: $FileNameWithoutExtension$.js:$FileNameWithoutExtension$.js.map