johnpapa/pluralsight-gulp

gulp-filter and gulp-csso

Opened this issue · 1 comments

If you'r on module Minifying and filtering - optimizing css, you may need to alter some code in correction to the video:

package.json

"gulp-csso": "^1.0.0",
"gulp-filter": "^3.0.1",

gulpfile.js

    var cssFilter = $.filter(['**/*.css'], {restore: true});

    return gulp
        .... omitted
        .pipe(cssFilter)
        .pipe($.csso())
        .pipe(cssFilter.restore)
        .... omitted

Notice the value of cssFilter and the pipe of css filter restore.

update:
You can also apply the same thing for the next video - Optimizing javascript

PR ?