gruntjs / grunt-docs

Grunt documentation. https://github.com/gruntjs/gruntjs.com
https://gruntjs.com/
79 stars 126 forks source link

Array for dynamic_mappings is incorrect #184

Closed jvoccia closed 8 years ago

jvoccia commented 8 years ago

When you use an array for files with a dynamic_mapping, the following warning appears and no files are found:

Warning: pattern.indexOf is not a function Use --force to continue.

Without the array the files properly expand.
_Note: _ this could instead be a bug in grunt/task.js with how it looks at obj.extend on line 138.

jvoccia commented 8 years ago

Just realized what was going on....

When you have:

uglify: {
  something: {
     files: [
                 {
                    expand: true,
                    cwd: 'src/',
                    src: ['**/*.js'],
                   dest: 'dist/',
                   extDot: 'first'
                 }
      ]
  }
}

Files works properly with the array. If you have:

uglify: {
     files: [
                 {
                    expand: true,
                    cwd: 'src/',
                    src: ['**/*.js'],
                   dest: 'dist/',
                   extDot: 'first'
                 }
      ]
}

Then the error appears: Warning: pattern.indexOf is not a function Use --force to continue.