Not working with subfolders
See original GitHub issueExpected behaviour:
- gulp-responsive takes files from subfolders
- transforms them
- puts in subfolders in the output folder
Code:
gulp.task('responsive2', function () {
gulp.src('./src/img/**/*.jpg')
.pipe(print())
.pipe(responsive([{
name: 'banner.jpg',
width: 600
}],
{
errorOnUnusedImage: false
}
))
.pipe(gulp.dest('./public/img/'));
});
Log:
[frontend-boilerplate] gulp responsive2 master ✭
[15:31:46] Using gulpfile ~/projects/frontend-boilerplate/gulpfile.js
[15:31:46] Starting 'responsive2'...
[15:31:46] Finished 'responsive2' after 9.45 ms
[15:31:46] src/img/imgs/banner.jpg
stream.js:75
throw er; // Unhandled stream error in pipe.
^
Error: Available images do not match following config:
- `banner.jpg`
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Subfolders and content not displaying - Microsoft Community
In my teams shared mail box, when I select a folder, none the contents are displayed which were previously inserted.
Read more >Git not pushing all subfolders or subdirectories - Stack Overflow
I solved it by removing all the git folders using rm -rf .git and then reinitializing and recommitting my work. Hope this helps....
Read more >unable to search within subfolders in Box? (Windows 10)
If I'm already in the subfolder I want, then it will search its contents, but this is unhelpful if looking for a file...
Read more >Does not work when WP installed in subfolder / subdirectory
htaccess inside that subdirectory and not in the main folder. It does work on initial install, but when cache is cleared or WordPress...
Read more >No more possibility to select subfolders for sync with last ...
Hi team, I have upgraded Owncloud with the last release this morning on my Windows desktop. It appears that I can no more...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @dandaka
It is exactly how
minimatch
works.minimatch is used by
gulp
itself. So I decided to use the same matching library for my plugin.match any file and any subfolder
match any file
match any file
not match
I think I get idea, why it doesn’t work. I got this code working:
The difference is in this line:
'**/*.png': [
— no error'*.png': [
— Error: Available images do not match following config:Is it a bug? Since in your example you don’t specify folders (only filenames), expected behaviour here is the same — no
**/
, only file*.png
.