I am doing this -
$ coffee -c assets/js
To compile all .coffee files into .js files in that directory. But i don't understand how I can watch the directory ?
I try this but get error -
$ coffee -wc assets/js
/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:287
if (e.code !== 'ENOENT') throw e;
^
Error: watch EMFILE
at errnoException (fs.js:648:11)
at FSWatcher.start (fs.js:676:11)
at Object.watch (fs.js:704:11)
at /usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:256:27
at Object.oncomplete (/usr/lib/node_modules/coffee-script/lib/coffee-script/command.js:85:25)
Any help will be greatly appreciated!
In one of my cake files I do this:
"coffee -o javascript/ -cw coffeescript/"
All of my .coffee files are in the coffeescript folder, and this compiles them into the same hierarchy in the javascript folder, as well as watching them.
It's from the docs. Hope it helps.
Tested with CoffeeScript 1.7.1
in command line:
coffee -wc DIR
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With