更新:用户错误 – TYPO! grunt-contrib-coffee错误查找文件并写入目的地

在我的Gruntfile.js中,我将咖啡任务configuration为如此,并在src/目录中存在一个script.coffee文件:

 coffee: { dist: { files: [{ /* FIX: exapand: true, */ expand: true, cwd: 'src/', src: '**/*.coffee', dest: 'lib/', ext: '.js' }] } } 

运行grunt coffee ,出现以下错误

 Running "coffee:dist" (coffee) task >> Source file "script.coffee" not found. >> Destination (lib/) not written because compiled files were empty. 

script.coffee的内容是testingcoffeescriptconfiguration的一些代码,并且在我从命令行运行coffee -c script.coffee时完美地编译。

script.coffeelogging:

 # 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' 

我有其他项目在其他地方使用这种相同的configuration…我只是可以不知道这个问题…

任何人有任何见解?

你在files: [{ exapand: true ... }]有一个错字files: [{ exapand: true ... }] ,它应该是expand: true