如何从.NET编译CoffeeScript? [英] How can I compile CoffeeScript from .NET?

查看:113
本文介绍了如何从.NET编译CoffeeScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个HttpHandler,它可以即时编译CoffeeScript代码,并发送生成的JavaScript代码。我试过MS [JScript] [1]和IronJS没有成功。我不想使用[Rhino] [2],因为Java依赖将使它难以分发。

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.

如何从.NET编译CoffeeScript?

How can CoffeeScript be compiled from .NET?

推荐答案

a href =https://github.com/abolibibelot/coffeescript-dotnet#readme =nofollow noreferrer> CoffeeScript-dotnet

CoffeeScript-dotnet

用于编译CoffeeScript的命令行工具。包括文件系统监视器,以便在更改时自动重新编译CoffeeScript。大致相当于linux / mac的咖啡脚本节点包。

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

包括类似于CoffeeScript-dotnet的命令行工具以及编译CoffeeScript的http处理程序当从asp.net网站请求时。

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

Asp.net mvc的库,可根据请求编译sass和coffeescript文件。还支持缩小和组合。

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

使用IronJS手动编译

IronJS .NET javascript解释器可以成功加载CoffeeScript编译器并编译CoffeeScript。

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

使用Node.js手动编译

获取节点二进制文件,并将bin目录添加到路径。编写 node.js脚本以加载CoffeeScript编译器和您的CoffeeScript文件并保存编译的javascript

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.

这篇关于如何从.NET编译CoffeeScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆