【发布时间】:2014-02-04 05:20:34
【问题描述】:
我经常使用grunt-contrib-concat,想知道为什么有些文件没有连接。我发现这是一个小错字。无论如何,我有很多不同目的地的不同文件。
grunt.initConfig({
concat: {
js: {
files: [
{
src: ["file1.js"],
dest: "some/dir/fileXY.js"
},
{
src: ["x/file2.js"],
dest: "some/other/dir/fileAB.js"
},
// and so on, and on
]
}
}
}
现在根据文档,我必须在对象文字本身中设置nonull: true,以便在文件不存在时获得一些警告。有没有办法默认设置,这样我就不必触摸它们中的每一个?
我尝试使用 options 对象,但到目前为止没有运气。
【问题讨论】:
-
您使用的语法无效
-
@IlanFrumer 是的,我是凭记忆输入的,在实际项目中是正确的。
-
请修复它,以便我可以测试它
-
@IlanFrumer 那里,我修好了
标签: javascript gruntjs concat grunt-contrib-concat