I am trying to grok the new "_references.ts" workflow, and feel like I'm missing something w/r/t using/combining multiple files (no external modules) and still producing correct "dependency-ordered" .js code. Starting with the standard "greeter" template example in Visual Studio 2013, I:
This compiles and runs fine. Thanks to the "all .ts files reference all other ones in the project" feature available as of TypeScript 0.9.1, I never had to explicitly reference "greeter.ts" from "app.ts". Thinking ahead to a large project, this will be very convenient.
BUT, it's only half the story (unless I'm missing something...new to JavaScript, too, so that's very likely). What about tooling to automatically order the list in "_references.ts" (e.g. auto-generation)? Seems to me that Visual Studio (TypeScript compiler?) already knows the correct ordering. I'm looking to port a C# application with many hundreds of classes, and it would be a daunting task to order these manually. Is there a "planned" feature to do this in 1.0, or should I be looking at 3rd party tools? I found grunt-ts...am I on the right track?
grunt-ts has had support for reference.ts
file creation since before visual studio supported it : https://github.com/basarat/grunt-ts#reference-file-generation
You can see a sample workflow here : http://www.youtube.com/watch?v=0-6vT7xgE4Y&hd=1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With