0

Looking at this SO answer: Excluding files/directories from Gulp task

It appears that I need to negate my file with a !. I have the following Gulp file:

gulp.task('css', function () {
    return gulp.src(['content/**/*.css', '!content/login.css'])
        .pipe(debug())
        .pipe(concat('styles.min.css'))
        .pipe(uglifycss())
        .pipe(gulp.dest('dist/css'))
});

My debug shows that login.css is being included.

...
[19:52:49] gulp-debug: content\LineItems.css
[19:52:49] gulp-debug: content\Login.css
[19:52:50] gulp-debug: content\NavBar.css
[19:52:50] gulp-debug: content\NewCompanySite.css
...

What am I doing wrong?

Community
  • 1
  • 1
Scottie
  • 11,050
  • 19
  • 68
  • 109

1 Answers1

0

Turns out Gulp is case sensitive.

I changed:

return gulp.src(['content/**/*.css', '!content/login.css'])

to

return gulp.src(['content/**/*.css', '!content/Login.css'])

and it worked perfectly.

Scottie
  • 11,050
  • 19
  • 68
  • 109
  • Why not change the filename to `login.css` instead? If you require that all static resources are lowercase-with-hyphens you (or someone else) won't run into this problem again – Duderino9000 Jul 30 '16 at 22:17