I'm trying to get prettify to run through one directory and prettify the html files into the same directory after Assemble creates the files. When running the default task together, prettify throws an error:
Running "prettify:indent" (prettify) task
Warning: Object 2 has no method 'indexOf' Use --force to continue
Subsequently, when I run each task individually everything works fine:
$ grunt assemble; grunt prettify
Here is my Gruntfile:
site: grunt.file.readYAML('src/template/data/site.yml'),
assemble: {
options: {
prettify: {indent: 2},
marked: {sanitize: false},
data: "src/template/data/site.yml",
layoutdir: 'src/template/layouts',
},
all: {
options: {production: false,layout: 'default.hbs'},
files: [
{ expand: true, cwd: 'src/template/pages', src: ['**/*.hbs'], dest: 'dist/' }
]
}
},
prettify: {
options: {
indent: 4,
wrap_line_length: 78,
brace_style: 'expand',
},
all: {
expand: true,
cwd: 'dist/',
ext: '.html',
src: ['*.html'],
dest: 'dist/'
}
}
Can someone point me in the right direction? Can prettify output to the same source directory?