jsoverson / grunt-plato

Generate static analysis reports with plato through grunt
MIT License
205 stars 23 forks source link

Cannot read property 'dest' of undefined #15

Closed willsoto closed 10 years ago

willsoto commented 10 years ago

Using the following config:

plato: {
    options: {
        jshint : grunt.file.readJSON('.jshintrc')
    },
    files: {
        'report': ['src/js/**/*.js', 'src/js/*.js']
    }
}

I get the following error:

Cannot read property 'dest' of undefined

This is the verbose output:

Running "plato:files" (plato) task
Verifying property plato.files exists in config...OK
File: [no files]
Options: jshint={"bitwise":true,"curly":true,"eqeqeq":true,"force":true,"freeze":true,"immed":true,"indent":4,"maxdepth":4,"smarttabs":true,"trailing":true,"undef":true,"unused":false,"globals":{"browser":true,"jQuery":true,"define":true,"console":true,"$":true,"_":true,"Mustache":true,"d3":true,"require":true,"setTimeout":true,"window":true,"moment":true,"confirm":true,"document":true,"ga":true}}, complexity={"newmi":true}

Using grunt v0.4.2

willsoto commented 10 years ago

Adding a task name actually resolves this problem, for whatever reason. Not sure if this is the intended behavior though. If it is, feel free to close.

jsoverson commented 10 years ago

That's intended and is grunt usage for multitasks. In the first example, it was trying to run a subtask 'files' which didn't have the appropriate configuration.