Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 607
liammclennan Avatar asked May 21 '10 03:05

liammclennan


People also ask

Is CoffeeScript still maintained?

As of today, January 2020, CoffeeScript is completely dead on the market (though the GitHub repository is still kind of alive).

How do I use CoffeeScript in HTML?

If you are looking to implement coffee script in html, take a look at this. You simple need to add a <script type="text/coffeescript" src="app. coffee"></script> to execute coffee script code in an HTML file.


2 Answers

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.

like image 79
liammclennan Avatar answered Oct 11 '22 14:10

liammclennan


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

like image 27
Evan Nagle Avatar answered Oct 11 '22 14:10

Evan Nagle