Complex Typescript Build Process ideas?

Topics: General
Feb 3, 2014 at 5:37 PM
Edited Feb 3, 2014 at 5:38 PM
Hello,

I'm prototyping a somewhat complex Typescript library for a Dynamics CRM application my team is developing. So far I'm loving the language, but my prototyping is nearing that nasty phase where logistics instead of theory suddenly becomes important.

So our library will consist of several components, something along the lines of this hierarchy:
  1. Utility Code
  2. Computer-Generated Data Access Code
  3. Business Code
Both Utility and Business code "modules" have a nested hierarchy and use the "One-class-per-file" rule. In general I would like these hierarchies to be compiled to a single file each. The Data Access Code on the other hand should be compiled into many different JS files so that consumers of the libraries can pick and choose which files they need access to.

All of that being said, I know how to invoke the TSC command-line compiler to get what I want. The problem I'm having is setting up Visual Studio 2013 and MSBuild (we're running on a TFS 2012 server) to do this. I started hacking around the CSProj file and quickly made a mess of the <TypescriptCompile> nodes and... well I am not sure where to go next.

Any guidance on this issue would be greatly appreciated. Thanks!
Feb 5, 2014 at 11:11 PM
What's the dependency graph between the 3 components?

I would start with 3 different projects for each, so you can easily set the single/multi-file output for each. Further the easiest is to generate d.ts files from each project and add this to the dependent projects.

Hth