-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support subfolder **/* glob pattern? #7
Comments
Hi @patrickcate
So in case when you specify sources as To math all files in sources and in |
works perfect thanx ! 🍻 can be add to examples ! gulp.task('default', function () {
return gulp.src('resources/uploads/**/*.png')
.pipe(
responsive(
{
'**/*.png' : [{
width: 50,
rename: {
//path.dirname += "";
prefix: "50-x-",
suffix: "-thumb"
//path.extname = ".md"
}
}]
})
)
.pipe(gulp.dest('webroot/galleries'));
}); |
@agborkowski thank you for using Maybe you will be interested in the following module: gulp-responsive-config It is just a proof of concept generation .test {
background-image: url(image-100x200.png);
}
.retina-test {
background-image: url(image-100x200@2x.png);
} will be parsed to: [{
name: "image.png",
width: 100,
height: 200,
rename: "image-100x200.png"
},{
name: "image.png",
width: 200,
height: 400,
rename: "image-100x200@2x.png"
}] and it can be passed directly to Short example: gulp.src('/images/**/*.png')
.pipe(gulpResponsive(gulpResponsiveConfig('/path/to/styles.css')))
.pipe(gulp.dest('build')); Currently gulp-responsive-config has no documentation and tests, but I plan to do it. |
👍 |
Confirmed, this works. |
🍻 ! |
I've organized a bunch of images into subfolders and am trying to do a batch resize of them. I've tried using the subfolder
**/*
glob pattern in the source, but it doesn't seem to work. Below is my config:When I run the task with strictMatchConfig set to true I get the error:
When set to false the error doesn't show, as expected, but either way all images in the subfolders are ignored.
Changing the src to one of the subfolders like
_source/assets/images/portraits/*.jpg
runs fine.Am I doing something wrong or is there a workaround? I appreciate any help.
The text was updated successfully, but these errors were encountered: