title: Grunt htmlmin errors
body: <p>I'm using <code>grunt-contrib-htmlmin</code> plugin. This is how my <code>Gruntfile.js</code> looks like:</p>
  
  <pre><code>module.exports = function(grunt) {
  
    grunt.initConfig({
      pkg: grunt.file.readJSON('package.json'),
  
      htmlmin: {
        dist: {
          options: {
            removeComments: true,
            collapseWhitespace: true
          },
          files: {
            '/views/build/404.html': '/view/src/404.html'
          }
        }
      }
    });
  
    grunt.loadNpmTasks('grunt-contrib-htmlmin');
  
    grunt.registerTask('default', ['htmlmin']);
  };
  </code></pre>
  
  <p>Nothing special, really. My 404.html is also pretty simple, but even on simpler <code>HTML</code> files, grunt doesn't work. For example, let's say take following <code>HTML</code> file:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It doesn't even work on that. What I get as a result in console is:</p>
  
  <pre><code>Running "htmlmin:dist" (htmlmin) task
  Minified 0 files (1 failed)
  
  Done, without errors.
  </code></pre>
  
  <p>Where can I see why it failed?</p>
  
  <p>I tried really many things like removing <code>options</code> and I also tried changing <code>file</code> structure where I ended up with this:</p>
  
  <pre><code>files: {
      expand: true,
      cwd: 'views/src/',
      src: '404.html',
      build: 'views/build/404.html'
  }
  </code></pre>
  
  <p>But that doesn't work either and error that I'm getting now is this:</p>
  
  <pre><code>Running "htmlmin:dist" (htmlmin) task
  Warning: pattern.indexOf is not a function Use --force to continue.
  
  Aborted due to warnings.
  </code></pre>
  
  <p>What am I doing wrong?</p>