Vojtěch Vojtěch - 1 year ago 122
TypeScript Question

TypeScript via tsc command: Output to single file without concatenation

Is there a way of compiling single .ts file to different directory?

The only way from the manual command of compilation to different directory is via

command, but it also does concatenation of dependent files, which I don't want:

--out FILE|DIRECTORY Concatenate and emit output to single file | Redirect output structure to the directory

Is there a way of redirecting the output WITHOUT concatenation of input files?

Answer Source

It does one or the other. If there's no .js extension on that file name it should assume a directory.

tsc -out output.js filea.ts fileb.ts... <- output to single file output.js

tsc -out output filea.ts fileb.ts... <- output individual files to dir output

tsc -out output/output.js filea.ts fileb.ts... <- output to single file in another directory

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download