田舎の技術者が奮闘中

php ruby node.js javascript などのスクリプト言語とサーバー(Chef、Vagrant)に関して書きます。

meteorでcoffeescriptを使用する際

ちょっとハマったのでメモ

meteorはデフォルトでcoffeescriptが使用できます。

公式を確認すると・・・

CoffeeScript is a little language that compiles into JavaScript. It provides a simple syntax without lots of braces and parentheses. The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime.

CoffeeScript is supported on both the client and the server. Files ending with .coffee are automatically compiled to JavaScript.

See http://jashkenas.github.com/coffee-script/ for more information.

「自動でコンパイルされるよっ」と書かれていましたがcoffeeのファイルを置いてもコンパイルされませんでした・・・

色々調べた所、準備はしているけどパッケージ使いたかったら指定してねって感じでした。
ですので・・・

$ meteor add coffeescript

これで動作するようになりました。
みなさんも気をつけてください。