gruntjs / grunt-contrib-coffee

Compile CoffeeScript files to JavaScript.
http://gruntjs.com/
MIT License
329 stars 127 forks source link

Error when trying to compile files in literate coffeescript (`*.litcoffee`) #137

Open monkeymonk opened 10 years ago

monkeymonk commented 10 years ago

When trying to compile file in .litcoffee Grunt send me an error of syntax:

➜ grunt coffee
Running "coffee:compile" (coffee) task
>> SyntaxError: In src/coffeescript/scripts.litcoffee, reserved word "with" on line 3
Warning: CoffeeScript failed to compile. Use --force to continue.

Aborted due to warnings.

src/coffeescript/scripts.litcoffee:

# Scripts - src/coffeescript/scripts.litcoffee

Martinus agens illas provincias pro praefectis aerumnas innocentium graviter gemens saepeque obsecrans, ut ab omni culpa inmunibus parceretur, cum non inpetraret, minabatur se discessurum: ut saltem id metuens perquisitor malivolus tandem desineret quieti coalitos homines in aperta pericula proiectare.

## Common

    # lot of stuff here...

When I try to compile with sudo coffee -o ../../public/js -j scripts.js -c scripts.litcoffee it works as expected.

bonbek commented 10 years ago

Same problem. I haven't dig a lot but in my case: the 'join' option was set to true and I only have one .litcoffee file. Removing this option fix the issue.

nat-n commented 10 years ago

could be related to #140 ??

monkeymonk commented 10 years ago

Not for me... no sourcemap in my Gruntfile.js :

coffee: {
    compile: {
        files: {
            'public/js/scripts.js': [
                'src/coffeescript/scripts.litcoffee'
            ]
        }
    },
}, // coffee
sethlivingston commented 9 years ago

Confirmed.