jashkenas/coffee-script — Issue #1911: Linebreak inserted before shebang in compiled output with CoffeeScript 1.1.3
Author: nateps
Created: 2011-12-04 20:40:30+00:00
State: open

I'm using CoffeeScript to write a node module that has a command line utility. Since the user might not have CoffeeScript installed, the compiled JavaScript needs to have a shebang on the first line. This works fine with CoffeeScript 1.1.2 using the following:

```
`#!/usr/bin/env node
`
```

Which compiles to:

```
#!/usr/bin/env node
;
```

Unfortunately, CoffeeScript 1.1.3 will output a linebreak as the very first line in the file in this case. This could be fixed by never inserting a linebreak as the first line in a file.