【Grunt + Karma + Jasmine】CoffeeScriptの開発環境を構築する

Grunt + CoffeeScript + Karma + Jasmine での開発をスタートして数ヶ月たった. ある程度ノウハウも溜まってきたので,メモしておく. CoffeeScript関連ライブラリをセットアップ $ npm init $ npm install $ npm install coffee-script --save-dev $ npm install grunt --save-dev $ npm install grunt-contrib-coffee --save-dev $ npm install grunt-contrib-concat --save-dev $ npm install grunt-contrib-uglify --save-dev $ npm install grunt-contrib-watch --save-dev プロダクトコード # src/hello.coffee hello = -> console.log("Hello world!!") # src/main.coffee hello() user = new User("Tanaka", 24) console.log(user.profile()) # src/user.coffee class User # static private param _uid = 987654321 # constructor constructor: (@NAME, @age) -> # public method profile: -> return @NAME + " : " + @age # private method _toAge = -> @age++ Gruntfile....