Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // var criticalCss = require('gulp-critical-css'),
- //example task gulp css
- gulp.task('css:build', function () {
- return gulp.src(path.src.css)
- .pipe(rigger())
- .on('error', handleError)
- .pipe(sass())
- .on('error', handleError)
- .pipe(prefixer({
- browsers: ['last 15 versions'],
- cascade: false,
- grid: true
- }))
- .pipe(csscomb())
- .pipe(reload({ stream: true }))
- //...
- //here begin handle critical
- .pipe(criticalCss())
- .pipe(rename({suffix: '.min'}))
- .pipe(cssmin())
- .pipe(gulp.dest(path.dist.css))
- });
Add Comment
Please, Sign In to add comment