title: Grunt.js, Warning: Unable to write "src" file (Error code: EISDIR)
body: <p>I have an <code>Gruntfile</code> written in <code>CoffeeScript</code> and I keep getting an <code>(Error code: EISDIR)</code> when the <code>cssmin</code> task is run. After running the task in verbose mode, I get this information:</p>
  
  <pre><code>Running "cssmin" task
  
  Running "cssmin:src" (cssmin) task
  Verifying property cssmin.src exists in config...OK
  Files: assets/z.styles.concat.css.liquid -&gt; src
  Options: report=false
  Reading assets/z.styles.concat.css.liquid...OK
  Writing src...ERROR
  Warning: Unable to write "src" file (Error code: EISDIR). Use --force to continue.
  </code></pre>
  
  <p>Here's my cssmin task:</p>
  
  <pre><code> cssmin: 
          src: 'assets/z.styles.concat.css.liquid'
          dest: 'assets/styles.min.css.liquid'
  </code></pre>
  
  <p>The <code>z.styles.concat.css.liquid</code> is created after <code>concat</code> runs and is successfully outputted to the assets folder. The path listed in the src attribute is correct.</p>
  
  <p>Any idea what could be throwing the error?</p>
  
  <p>Also, here is the entire gruntfile for connivence.</p>
  
  <p>Grunt.coffee:</p>
  
  <pre><code>module.exports = (grunt) -&gt;
  
  # Project configuration.
    grunt.initConfig
      pkg: grunt.file.readJSON 'package.json'
  
      files:
        grunt:     ['gruntfile.js']
        css:       ['assets/screen.css', 'assets/styles.css.liquid']
        scss:      ['src/scss/**/*.scss']
        js:        ['src/js/**/*.js'] #(if we need liquid templating), 'src/js/**/*.js.liquid', 'assets/**/*.js.liquid']
        coffee:    ['src/js/coffee/**/*.coffee', 'src/js/coffee/**/*.coffee.liquid']
        img:       ['src/images/**/*.{png,jpeg,svg,jpg,gif}']
  
  # Image Processing
      smushit:
        path:  
          src: '&lt;%= files.img %&gt;'  #recursively replace minified images
          dest: 'assets'
  
  # Concatenation Processing
      concat: 
        css: 
          src: ['&lt;%= files.css %&gt;']
          dest: 'assets/z.styles.concat.css.liquid'     
  
        js: 
          src: ['&lt;%= files.js %&gt;']
          dest: 'src/js/z.scripts.concat.js'
  
  
  # JavaScript Processing
      coffee:
            app:
              expand: true
              cwd: 'src/js/coffee'
              src: ['**/*.coffee', '**/*.coffee.liquid']
              dest: 'src/js'
              ext: '.js'
  
      uglify: 
        dist: 
          src: ['src/js/z.scripts.concat.js']
          dest: 'assets/scripts.min.js'
  
      jshint: 
        files: ['&lt;%= files.grunt %&gt;', 'src/js/z.scripts.concat.js']
  
        options: 
          jquery: true
          smarttabs: true
          curly: true
          eqeqeq: true
          immed: true
          latedef: true
          newcap: true
          noarg: true
          sub: true
          undef: true
          boss: true
          eqnull: true
          browser: true
  
        globals: 
          jQuery: true
          console: true
          undef: true
          unused: false
  
  
  
  # CSS Processing
      compass: 
        dist: 
          options: 
            sassDir: 'src/scss'
            cssDir: 'assets'
            imagesDir: 'assets',
            javascriptsDir: 'assets',
            outputStyle: 'expanded'   
  
      cssmin: 
          src: 'assets/z.styles.concat.css.liquid'
          dest: 'assets/styles.min.css.liquid'
  
  
  # watch tasks
      watch:
        options:
          nospawn: true
          events: ['changed', 'added']
        files: [
                  '&lt;%= files.js %&gt;'
                  '&lt;%= files.coffee %&gt;'
                  '&lt;%= files.scss %&gt;'
              ]
        tasks: ['default']
  
    # These plugins provide necessary tasks.
    grunt.loadNpmTasks 'grunt-contrib-coffee'
    grunt.loadNpmTasks 'grunt-contrib-watch'
    grunt.loadNpmTasks 'grunt-contrib-concat'
    grunt.loadNpmTasks 'grunt-contrib-jshint'
    grunt.loadNpmTasks 'grunt-contrib-uglify'
    grunt.loadNpmTasks 'grunt-contrib-cssmin'
    grunt.loadNpmTasks 'grunt-smushit'
    grunt.loadNpmTasks 'grunt-contrib-compass'
  
  # Default task.
    grunt.registerTask 'default', [
                        'coffee'
                        'concat:js'
                        'jshint'
                        'uglify'
                        'concat:css',
                        'cssmin'
                      ]
  
     # Minify task
  
     # Run the default task then losslessly minify images with Yahoo!'s Smush-It
  
    grunt.registerTask 'minify', ['default', 'smushit']
  </code></pre>