我对grunt来说相当陌生,从字面上看只有几个小时。我正在使用grunt-cache-breaker设置grunt来缓存我的网站。现在,我已经得到了它,当我手动输入每个文件源示例工作:从外部文件加载Grunt任务属性
grunt.initConfig({
cachebreaker: {
dev: {
options: {
match: ['.js', '.css', 'min.css'],
src: {
path: 'TEST/Apps/**/*'
}
},
files: {
src: ['TEST/Apps/AppTemplate/v1.0.0/index.html',
'TEST/Apps/Case_Attributes/v1.0.0/index.html',
'TEST/Apps/Case_CorrespondenceReferences/v1.0.0/index.html',
',
]
}
},
},
});
但是我真正想要做的是能有问题从预先生成的文本文件,这样构筑files.src名单:
grunt.initConfig({
cachebreaker: {
dev: {
options: {
match: ['.js', '.css', 'min.css'],
src: {
path: 'TEST/Apps/**/*'
}
},
files: {
src: function(){
return grunt.file.read('config.txt')
}
}
},
},
});
或其他影响。这可能吗?还是我完全不符合标准?