刚刚在Ubuntu 12.04上安装了最新的Grunt.这是我的gruntfile:
module.exports = function(grunt){
//project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
slides : {
src : ['src/top.html', 'src/bottom.html'],
dest : ['build/index.html']
}
}
});
//enable plugins
grunt.loadNpmTasks('grunt-contrib');
grunt.registerTask('default', ['concat:slides']);
}
Run Code Online (Sandbox Code Playgroud)
这样可以很好地构建build /目录,但是给出了以下输出:
运行"concat:slides"(concat)任务警告:无法编写"build/index.html"文件(错误代码:undefined).使用--force继续.
我尝试在目录上运行chmod 777,因为我认为它可能与权限有关,但这似乎没有改变任何东西.
我如何才能使Grunt写入build/index.html?
gruntjs ×1