我有这个 grunt-copy 设置:
copy: {
images: {
cwd: 'src/multiselect/lib/',
src: 'chosen.css',
dest: './built/css/',
flatten: true,
filter: 'isFile'
}
},
当我运行它时,它总是这样:
Running "copy:images" (copy) task
Warning: Unable to read "chosen.css" file (Error code: ENOENT). Use --force to continue.
Aborted due to warnings.
奇怪的是,如果我用这个配置运行它:
copy: {
images: {
src: 'src/multiselect/lib/chosen.css',
// src: 'chosen.css',
dest: './built/css/',
flatten: true,
filter: 'isFile'
}
},
它每次都有效。有人知道为什么吗?似乎错误发生在这行代码上:
grunt.file.copy(src, dest, copyOptions);
在 grunt-contrib-copy 任务中。任何帮助将不胜感激。