jashkenas/coffee-script — pull request #1968 by TrevorBurnham (2011-12-24 01:12:19+00:00)
Title: Fixing #1023 by moving compiler events from command to coffee-script

See #1023 and #1967. In command.coffee, we mix `EventEmitter` in to the CoffeeScript object so that we can have compilation events. But compilation events are useful elsewhere, including the browser. This patch adds a tiny (9-line) EventEmitter-alike to the CoffeeScript object and has it emit events from the `compile` function in the same way that it was doing in `command.coffee`.