gruntjsgruntfile

gruntfile.js Unable to compile; no valid source files were found


I am new to grunt and I'm having a tough time trying to figure out what I've done wrong.

When I run it I get the error "Unable to compile; no valid source files were found."

If anyone could give me some advice as to how to fix it, I would appreciate it.

Here is my gruntfile:

  module.exports = function(grunt) {

    grunt.initConfig ({
      responsive_images: {
        dev: {
          options: {
            engine: 'im',
            sizes: [{
              width: 1600,
              suffix: '_large_2x',
              quality: 30
            }]
          },
          files: [{
            expand: true,
            src: ['**/*.{gif,jpg,png};'],
            cwd: 'images_src/',
            dest: 'images/'
          }]
        }
      },
    });

    grunt.loadNpmTasks('grunt-responsive-images');
    grunt.loadNpmTasks('grunt-contrib-imagemin')
  grunt.registerTask('default', ['responsive_images']);};

Here is my Package.json

{
  "name": "reponsive-images",
  "version": "0.1.0",
  "repository": {
    "type": "git",
    "url": "https://github.com/udacity/responsive-images.git"
  },
  "devDependencies": {
    "grunt": "~0.4.5",
    "grunt-contrib-clean": "~0.6.0",
    "grunt-contrib-copy": "~0.8.0",
    "grunt-contrib-imagemin": "^1.0.1",
    "grunt-contrib-jshint": "~0.10.0",
    "grunt-contrib-nodeunit": "~0.4.1",
    "grunt-contrib-uglify": "~0.5.0",
    "grunt-mkdir": "~0.1.2"
  },
  "dependencies": {
    "grunt-responsive-images": "^0.1.6"
  }
}

Any advice you guys can provide would be appreciated!


Solution

  • I solved it!

    I needed to edit my src path to: ['/**/*.{gif,jpg,png};],