【发布时间】:2013-03-20 04:12:50
【问题描述】:
刚刚在 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']);
}
这很好地创建了 build/ 目录,但给了我以下输出:
运行“concat:slides”(concat) 任务警告:无法写入 “build/index.html”文件(错误代码:未定义)。使用 --force 来 继续。
我尝试在目录上运行 chmod 777,因为我认为它可能与权限有关,但这似乎并没有改变任何东西。
我怎样才能让 Grunt 写入 build/index.html?
【问题讨论】:
标签: gruntjs