Answer the question
In order to leave comments, you need to log in
How to make grunt-contrib-coffee compile human?
For some reason grunt-contrib-coffee compiles the following CoffeeScript code:
f = () ->
alert()
return
(function() {
var f;
f = function () {
alert();
}
}).call(this);
coffee: {
compile: {
files: [{
cwd: 'src/scripts',
src: '**/*.coffee',
dest: 'result/scripts',
expand: true,
flatten: true,
ext: '.js',
}]
},
},
coffeelint: {
app: {
src: "src/coffee/*.coffee",
},
no_tabs: {
level: "ignore"
},
indentation: {
level: "warn"
},
no_trailing_whitespace: {
level: "error"
},
no_trailing_semicolons: {
level: "error"
},
no_plusplus: {
level: "warn"
},
no_implicit_parens: {
level: "ignore"
},
max_line_length: {
level: "ignore"
},
},
Answer the question
In order to leave comments, you need to log in
Have you tried reading the documentation?
bare
Type: boolean
Compile the JavaScript without the top-level function safety wrapper.
Therefore, put somewhere in the options:
options: {
bare: false
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question