chang some files to coffeescript. add grunt json task to transfer resource data.