Grofit
Grofit

Reputation: 18435

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?

I am thinking like how you have a .net dll which contains the root namespace and all children.

Upvotes: 2

Views: 1579

Answers (1)

Grofit
Grofit

Reputation: 18435

I managed to find some links after posting this:

TypeScript compiling as a single JS file 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

Upvotes: 2

Related Questions