4Str4ngeG4me
4Str4ngeG4me

Reputation: 536

Minify a big TypeScript application automated

what's the best way to minify and merge all my generated JavaScripts automated. I use Visual Studio to develop my application. I have the idea to create a script and use jsmin. But how to replace the references in my main index.html?

regards

Upvotes: 1

Views: 436

Answers (1)

basarat
basarat

Reputation: 276189

You can use --out yoursinglefile.js parameter on tsc. This will give you a single merged JS file for all your typescript files. e.g.:

tsc a.ts b.ts --out merged.js

Next you can minify this file using jsmin or google closure or whatever :)

Upvotes: 1

Related Questions