coffee2js腳本
#!/bin/sh
# Install coffeescript cli
npm -g install coffee-script
# Convert all coffeescript files to javascript
find . -name "*.coffee" -exec coffee --no-header --bare -c {} \;
# Optionally delete original coffee files
find . -name "*.coffee" -exec rm {} \;
js2coffee
- 安裝
npm install --global js2coffee
- 使用
$ js2coffee file.js [file2.js ...]
$ cat file.js | js2coffee