grunt-data-uri
grunt-data-uri copied to clipboard
TypeError: Cannot read property 'indexOf' of undefined
dist: {
src: [ "cache/views/index.css" ],
dest: "cache/views/index.css",
}
➜ grunt dataUri
Running "dataUri:dist" (dataUri) task
[TypeError: Cannot read property 'indexOf' of undefined]
Warning: Cannot read property 'indexOf' of undefined Use --force to continue.
➜ uname -a
Darwin MacBook-Pro--Monolithed.local 14.1.0 Darwin Kernel Version 14.1.0:
Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
I've got the same issue, running dataUri as a module
{
src: ['css/*.css'],
dest: 'temp'
}
→ grunt dataUri
Running "dataUri:all" (dataUri) task
Warning: Cannot read property 'indexOf' of undefined Use --force to continue.
Aborted due to warnings.
→ uname -a
Darwin MacBook.local 14.1.0 Darwin Kernel Version 14.1.0: Thu Feb 26 19:26:47 PST 2015; root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
I've also run into this problem. You have to define the targets array in options. E.g.
{
src: ['css/*.css'],
dest: 'temp',
options: {
target: ['static/pics/**'],
},
}
Of course, it could have a better error message.