Just installed latest Grunt on Ubuntu 12.04. Here is my 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']); }
This creates the build/ directory fine, but gives me the output of:
Running "concat:slides" (concat) task Warning: Unable to write "build/index.html" file (Error code: undefined). Use --force to continue.
I tried running chmod 777 on the directory, as I thought it might have something to do with permissions, but that didn't seem to change anything.
How can I make it so Grunt will write to build/index.html?
Figured it out:
//Does not work dest : ['build/index.html']
Works as a string, but not an array:
//Works dest : 'build/index.html'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With