Javascript 更新:用户错误-输入错误!!grunt contrib coffee错误查找文件&;写入目的地
在我的Grunfile.js中,我将coffee任务配置为so,并且一个文件Javascript 更新:用户错误-输入错误!!grunt contrib coffee错误查找文件&;写入目的地,javascript,node.js,coffeescript,gruntjs,Javascript,Node.js,Coffeescript,Gruntjs,在我的Grunfile.js中,我将coffee任务配置为so,并且一个文件script.coffee存在于src/目录中: coffee: { dist: { files: [{ /* FIX: exapand: true, */ expand: true, cwd: 'src/', src: '**/*.coffee', dest: 'lib/',
script.coffee
存在于src/
目录中:
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
的内容只是一些测试coffeescript配置的代码,当我从命令行运行coffee-c script.coffee
时,它可以完美地编译
script.coffee记录如下:
# 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'
我有其他项目在其他地方使用相同的配置。。。我只是可以;我不明白这个问题
有人有什么见解吗?你在
文件中有一个打字错误:[{exapand:true…}]
,应该是expand:true