andismith / grunt-responsive-images

Produce images at different sizes for responsive websites.
http://www.andismith.com/grunt-responsive-images/
MIT License
719 stars 96 forks source link

Not working at all #97

Closed cizza closed 8 years ago

cizza commented 8 years ago

Hi, I have a problem with this plugin which was working for me just fine. It's not working anymore since I have created a folder in my assets/ folder which I was targeting with this plugin as a destination folder. The folder structure was:

/assets/images (src) /assets/images-to-min (dest)

originaly the dest folder was in:

/images

The configuration of the plugin is :

responsiveimages: { myTask: { options: { sizes: [{ name: "", width: 320 },{ name: "medium", width: 640 },{ name: "large", width: 1024, }] }, files: [{ expand: true, src: ['*/_.{jpg,gif,png}'], cwd: 'assets/images/', dest: 'images/' }] } }, watch: {

        images: {
            files: ['assets/images/**/*.{jpg,png,gif}'],
            tasks: ['responsive_images']
        }, //end of watch

    }

Well it is very strange problem because I am positive everything was working fine until I created that folder in the same directory as a the source image folder. When I retracted my code to the original version it still didn't work until I erased that new folder. Than it worked for a while and than zip.

I was wondering if this plugin is caching anything? Than it would be possible to purge the cache and it might work again.

Thanks

cizza commented 8 years ago

After more testing it seems to be a problem with the grunt-contrib-watch as I am able to run this task manually.

andismith commented 8 years ago

The src looks slightly wrong.

src: ['*/.{jpg,gif,png}'], should be src: ['**/*.{jpg,gif,png}'],

andismith commented 8 years ago

Did fixing the config solve the problem?

I'd like to close this issue please.