Gulp throwing error: File not found with singular glob

As it turns out I missed changing file name in HTML file as it was calling main.css instead of style.css. <!–build:css css/main.min.css –> <link rel=”stylesheet” href=”https://stackoverflow.com/questions/36839828/css/main.css”> <!– endbuild –> Changed it to: <!–build:css css/style.min.css –> <link rel=”stylesheet” href=”https://stackoverflow.com/questions/36839828/css/style.css”> <!– endbuild –> An honest mistake but I believe someone else can run into something similar 🙂

Gulp – Target all files in a folder and its subfolders

It’s supposed to match any number of subdirectories: ** If a “globstar” is alone in a path portion, then it matches zero or more directories and subdirectories searching for matches. It does not crawl symlinked directories. https://github.com/isaacs/node-glob Do you have symlinked directories in there? Symlinks I don’t think you’ll get gulp to natively traverse your … Read more

What does npm mean by ‘Skipping failed optional dependency’?

This is not an error. It is a warning that fseventsd, which is Mac OS specific, cannot be installed on Linux. There is no need to be alarmed, and the package that needs fsevents will still work – that’s why it’s an optional dependency. Since many people are confused about this (particularly since this used … Read more

Gulp.js event stream merge order

Try streamqueue. var streamqueue = require(‘streamqueue’); gulp.task(‘css’, function () { return streamqueue({ objectMode: true }, gulp.src([‘dev/css/reset.css’, ‘dev/css/style.css’, ‘dev/css/typography.css’, ‘dev/css/sizes.css’]), gulp.src([‘dev/css/*.scss’]).pipe(sass()) ) .pipe(concat(‘main.css’)) .pipe(minifyCSS()) .pipe(gulp.dest(‘build/css’)) }); This cheatsheet will help you. PDF is here.

Can Gulp overwrite all src files?

I can think of two solutions: Add an option for base to your gulp.src like so: gulp.src([…files…], {base: ‘./’}).pipe(…)… This will tell gulp to preserve the entire relative path. Then pass ‘./’ into gulp.dest() to overwrite the original files. (Note: this is untested, you should make sure you have a backup in case it doesn’t … Read more