3 ms·
Running 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 u
by samdk 16y ago
Running
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.