4 ms·
Coffeescript makes many of theses things seamless. Reminds me of another article called Scala == Effective Java? http://grahamhackingscala.blogspot.com/2011/01
by DanielRibeiro 16y ago
Coffeescript makes many of theses things seamless. Reminds me of another article called Scala == Effective Java?
http://grahamhackingscala.blogspot.com/2011/01/does-scala-equal-effective-java-bloch.html http://grahamhackingscala.blogspot.com/2011/01/does-scala-eq...
- mhb 16y agoCoffeeScript looks great, but doesn't it mess up the workflow to have to compile in order to fix a bug? Or do people typically download CoffeeScript into the browser during development? Or is using it enough of a benefit to outweigh having to do the extra step?
- rodp 16y agoI compile CoffeeScript on the fly while in development mode. In production, I cache JavaScript. Debugging JavaScript and writing CoffeeScript doesn't bother me much although it can get a little awkward at times. I simply consider CoffeeScript a nicer, less painful way to write JavaScript and nothing more.
- DanielRibeiro 16y agoI use a watchr ruby script to keep the js constantly compiled. It is publically avaible on github (the project is https://github.com/danielribeiro/EaselBugTracker https://github.com/danielribeiro/EaselBugTracker). Look into the Rakefile, coffeecompiler.rb and compileall.rb Using on the browser is a possibility, but it is experimental (and experimental on a experimental language can get really crazy). But coffeescript is rapidly moving from a experimental language to a more stabilished one. And if you are using Continuous deployment, the compiler step can be used only explicitely on the deployment fase, while keeping the js compiler on the browser only. I however find usefull seeing the compiled js even when developing (the emacs mode for coffeescript also helps a lot here), as chrome and other browsers still only debugs js (there is some work in allowing it to debug compiled languages).
- samdk 16y agoRunning coffee -cw *.coffee will watch all of the CoffeeScript files in a directory and compile them to JavaScript whenever they change, which is what I use for keeping things updated in development, and the production deployment scripts I run compile the CoffeeScript to JS before deploying. Aside from having to set up a terminal running the compilation task when I start a dev session, the fact that it has to be compiled doesn't affect me at all.
- DanielRibeiro 16y agoThe script I use watch the whole tree. And it compiles from a source tree to a dest tree. But this is a nice hack for those starting out.
- weixiyen 16y agoHere's ./dev bash script for node.js projects #!/bin/bash coffee -wcl public/ && coffee -wcbl ./ Uses the local function scope wrapper for js files served to client side in the public folder and removes function scope wrapper for server side files in the entire directory tree. Type ./dev and I'm up and running.