-
Notifications
You must be signed in to change notification settings - Fork 44
sub folder support for image resizing #39
Copy link
Copy link
Open
Description
This will enable sub folder support via cwd option:
cwd: 'assets/src/',
src: '*/*.png',
dest: 'assets/images/',
the files will be resized from > to:
assets/src/folder/image.png > assets/images/folder/image.png
assets/src/another/file.jpg > assets/images/another/file.jpg
-51 filepath = f, imOptions = {
+51 filepath = (list.cwd || '')+f, imOptions = {
-53 dstPath: (list.dest[list.dest.length-1] !== '/') ? list.dest : path.join(dirname, path.basename(filepath)) ,
-53 dstPath: (list.dest[list.dest.length-1] !== '/') ? list.dest : path.join(dirname, path.dirname(f), path.basename(filepath)) ,
-104 grunt.log.ok('Image '+filepath+' resized to '+ list.dest);
+104 grunt.log.ok('Image '+filepath+' resized to '+ imOptions.dstPath);
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels