jashkenas/coffee-script — Issue #2067: Only first file fed to compiler is wrapped; the rest are bare
Author: Flambino
Created: 2012-01-24 23:41:06+00:00
State: open

When compiling several files (without `--join` concatenation), only the first file in the list gets compiled with a function-wrapper. All following files are compiled _without_ the wrapper (but still indented, and with blank line top and and bottom, as though the wrapper's there).

Example:

$ coffee -c file_a.coffee file_b.coffee

Will output:

_file_a.js_

(function() {
// ... file_a's code - wrapped
}).call(this);

_file_b.js_

// ... file_b's code - no function wrapper!