How can I compile CoffeeScript from .NET?

I want to write an HttpHandler that compiles CoffeeScript code on-the-fly and sends the resulting JavaScript code. I have tried MS [JScript][1] and IronJS without success. I don't want to use [Rhino][2] because the Java dependency would make it too difficult to distribute.

How can CoffeeScript be compiled from .NET?


Solution 1:

CoffeeScript-dotnet

Command line tool for compiling CoffeeScript. Includes a file system watcher to automatically recompile CoffeeScripts when they change. Roughly equivalent to the coffee-script node package for linux / mac.

CoffeeSharp

Includes a command line tool similar to CoffeeScript-dotnet as well as a http handler that compiles CoffeeScripts when requested from an asp.net site.

SassAndCoffeeScript

Library for Asp.net mvc that compiles sass and coffeescript files on request. Also supports minification and combination.

Manually Compile With IronJS

IronJS is a .NET javascript interpreter that can successfully load the CoffeeScript compiler and compile CoffeeScript.

Manually Compile With Node.js

Get the node binaries and add the bin directory to your path. Write a node.js script to load the CoffeeScript compiler and your CoffeeScript files and save the compiled javascript.

Solution 2:

CoffeeScript is now fully supported by Chirpy: http://chirpy.codeplex.com/