首先安装coffee-script
引用
npm install coffee-script
在js文件中加入下面代码
require('coffee-script');//引用coffeescript模块 require('./mytest');//指向要运行的coffeescript文件,可加多个文件。
就可以node xx.js,来运行coffeescript文件了。
require('coffee-script');//引用coffeescript模块 require('./mytest');//指向要运行的coffeescript文件,可加多个文件。