1

Some time ago I used to do

coffee --bare --output . --watch --compile .

This watches the .coffee files in the current dir and recompiles them as they change.

Now, using 1.2.0 of coffeescript this does not seem to work any more. I'm presented with an error:

File not found: --watch.coffee

and the usage documentation for coffee seems rather light.

Emil Ivanov
  • 37,300
  • 12
  • 75
  • 90
  • 1
    Hmm... `--compile --output . .` works, but putting `--output .` in between other flags doesn't. This sounds like a regression to me. It's worth reporting it on the [issue tracker](https://github.com/jashkenas/coffee-script/issues). – Trevor Burnham Jan 06 '12 at 22:15

2 Answers2

7

I'd skip the --output ., as it seems to be unnecessary if you're already in the same directory, and go straight with

coffee -bcw *.coffee

Otherwise, this is a duplicate of Compile CoffeeScript on Save?

Community
  • 1
  • 1
Elf Sternberg
  • 16,129
  • 6
  • 60
  • 68
3

BTW, you can also go:

coffee -bcw .

which will not only save a few keystrokes, but also scan subdirectories to compile .coffee files.

Chris
  • 4,594
  • 4
  • 29
  • 39