Hacker News new | past | comments | ask | show | jobs | submit login

Probably right now. But that's a good question. As you've already seen, the documentation on http://coffeescript.org is phenomenal.

As a dev with maybe 1.5 years of JS experience, I've learned coffeescript in a week. I still don't have the coding style that my code reviewers want, but I'm writing functional code.

The biggest hurdle I've found is getting an auto-compiler for coffeescript. You don't want to do it manually:

    coffee -c media/js/page.js media/js/page.coffee
everytime you want to recompile your code. But there are tools for that! https://github.com/gruntjs/grunt-contrib-coffee



Was:

    coffee --watch
... not working well enough for you? For fancier build processes, you certainly might want to use a fancier build tool.


I have not had great luck mixing coffee --watch and gvfs for either FTP or WebDAV. An ugly, but effective solution is to configure your editor to compile on save. The most annoying part of that is when you switch to a project with a different build process, and you have to either reconfigure your editor, or deal with extraneous .js files being output.


For a minimal compile-on-save, you can just use: coffee -wc media/js/page.js media/js/page.coffee

It's not suitable for large projects, but it is good enough for single file compilation.

See here for more options: http://coffeescript.org/#usage


Give it a directory instead of a file and it will automatically compile any .coffee files in that tree.


That's a good point!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: