Reputation: 533
In my Gruntfile.js I have the coffee task configured as so and one file script.coffee
exists in the src/
directory:
coffee: {
dist: {
files: [{
/* FIX: exapand: true, */
expand: true,
cwd: 'src/',
src: '**/*.coffee',
dest: 'lib/',
ext: '.js'
}]
}
}
When running grunt coffee
I get the following error:
Running "coffee:dist" (coffee) task
>> Source file "script.coffee" not found.
>> Destination (lib/) not written because compiled files were empty.
The content of the script.coffee
is just some code to test the coffeescript configuration and compiles perfectly when I run coffee -c script.coffee
from the command line.
script.coffee for the record:
# A bubble sort implementation, sorting the given array in-place.
bubble_sort = (list) ->
for i in [0...list.length]
for j in [0...list.length - i] when list[j] > list[j + 1]
[list[j], list[j+1]] = [list[j + 1], list[j]]
list
# Test the function.
console.log bubble_sort([3, 2, 1]).join(' ') is '1 2 3'
console.log bubble_sort([9, 2, 7, 0, 1]).join(' ') is '0 1 2 7 9'
I have other projects elsewhere using this same configuration... I just can;t figure out the issue...
Anyone have any insight?
Upvotes: 1
Views: 182
Reputation: 3305
You have a typo in files: [{ exapand: true ... }]
, it should be expand: true
.
Upvotes: 2