News for hackers. Stuff that matters.

Tackle Complexity in Typescript apps with TSMC

http://theblacksmithhq.com/tsmc

TSMC allows you to configure the modules and submodules (as well as their inner dependencies) you want to get out of your library/app and compile them giving you separately packaged modules and submodules.

Let's say you have a modals module, inside your ui namespace which is one of many namespaces inside your awesomejs lib. Driven by your config, tsmc will give you a awesomejs-ui-modals.js, an awesomejs-ui.js (which contains everything inside ui, including modals) and a awesomejs.js (which includes ui and everything else). For each package it will also give you a declaration (.d.ts) file and a sourcemap (.js.map) file. AFAIK, this is the best way available to have your source code compiled into a big combine package as well as fine grained modules.

( 2 comments | 4 points | on HN )
Re:Tackle Complexity in Typescript apps with TSMC by svallory on Thursday November 21, 2013 @05:32PM (#6777994)
Cool @paf31, please let me know how it goes!
Re:Tackle Complexity in Typescript apps with TSMC by paf31 on Thursday November 21, 2013 @11:20AM (#6775459)
Neat! I'll try this out today.