Fork me on GitHub

CoffeeScript compilation for Windows

Call the CoffeeScript compiler from .NET, IIS, or the Windows commandline.

Install via NuGet

To install CoffeeSharp in a Visual Studio project, open the Package Manager Console and type:

PM> Install-Package CoffeeSharp

Alternatively, you can use the Package Manager dialog; see the video for an example.

Download binaries

If you can't use NuGet, just download the binaries in a zip file.

The download CoffeeSharp-0.6.zip contains the following:

Example: CoffeeSharp.dll

Here's an example of how to use the library:

var cse = new CoffeeSharp.CoffeeScriptEngine();
string js = cse.Compile("square = (x) -> x * x");

Example: Coffee.exe

Here's an example of how to use the commandline tool:

PS> cat .\src\test.coffee
square = (x) -> x * x
console.log 'two squared', square 2

PS> Coffee.exe -o .\bin -c .\src

PS> cat .\bin\test.js
(function() {
  var square;
  square = function(x) {
    return x * x;
  };
  console.log('two squared', square(2));
}).call(this);

Note: Use the --watch flag, to keep the compiler running in 'watch-mode'. This way, it will continue monitoring the source files for any changes, and recompile immediately when they're modified.

Sources

The source code of CoffeeSharp is available on github, it is BSD3 licenced.

Change Log

0.6.0 - June 9, 2015

Updated to CoffeeScript 1.9.3

0.5.0 - April 18, 2012

Updated to CoffeeScript 1.3.1

0.4.0 - March 28, 2012

Updated to CoffeeScript 1.2.0

0.3.0 - August 8, 2011

Updated to CoffeeScript 1.1.2

0.2.0 - May 6, 2011

Updated to CoffeeScript 1.1.0

0.1.0 - April 22, 2011

Initial release, ships with CoffeeScript 1.0.1