TypeScript Canary

Topics: General
Nov 13, 2013 at 4:04 AM
Hello,

Since the TypeScript team is heads-down with coding right now and it's been a while since v0.9.1.1 was released, I figured that folks might find it useful to have an easy-to-use tool to help them grab and test out the latest TypeScript commits on the develop branch. To assist with this, I've written a PowerShell script that I call "TypeScript Canary".

https://github.com/nycdotnet/TypeScriptCanary

This script uses Git and Node.js to clone/fetch the TypeScript develop branch from CodePlex, and allows you to select a specific commit to try out. When you instruct it to use a commit, TypeScript Canary will back up your existing TypeScript version, checkout and compile the specified bits, and then overwrite your existing TypeScript bits with the built version. Reverting to a previous version is as easy as finding the TypeScriptSourceCode\backupTypeScriptFiles directory under your "My Documents" folder, opening the backup folder with the correct timestamp, and running the "restore" batch file there.

Please note that the latest bits from develop (v0.9.5) work great from the TSC compiler, but recent releases are not compatible with the old v0.9.1.1 VS plugin (the latest currently released). As such, you have to test the very latest bits from the command-line or using some other compilation method. If you want to use a more recent version than v0.9.1.1 in VS, commit 68cdf128fb5f from October 29 seems to mostly work in Visual Studio (I only noticed that the "double dropdowns" don't ever refresh). Hopefully in the future, the TypeScript team will be willing to open source the plug-in (or at least provide nightlies in some fashion) so this could be improved further.

Notes: This script will clone the TypeScript repo to your "My Documents" folder which will take approximately 2.5 GB; after the initial download, only deltas are pulled over the wire as with normal Git. The TypeScript Canary script also requires that you have Node.js and Git installed and on the path. Finally, if you're expecting Visual Studio integration, you will have had to already download and install the latest available official TypeScript plugin for Visual Studio - v0.9.1.1.

Use this command to get everything set up and then follow the on-screen instructions from there:
powershell .\GetLKGTypeScript.ps1
If you immediately get a PowerShell error, you may have to set up PowerShell to allow running local unsigned scripts: http://technet.microsoft.com/en-us/library/ee176961.aspx

I hope that the TypeScript community finds this useful and I'd love to hear any feedback you may have. Issue reports and pull requests accepted.

-Steve Ognibene
@nycdotnet