Guest User

Untitled

a guest
Apr 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. // var criticalCss = require('gulp-critical-css'),
  2.  
  3. //example task gulp css
  4.  
  5. gulp.task('css:build', function () {
  6. return gulp.src(path.src.css)
  7. .pipe(rigger())
  8. .on('error', handleError)
  9. .pipe(sass())
  10. .on('error', handleError)
  11. .pipe(prefixer({
  12. browsers: ['last 15 versions'],
  13. cascade: false,
  14. grid: true
  15. }))
  16. .pipe(csscomb())
  17. .pipe(reload({ stream: true }))
  18. //...
  19.  
  20.  
  21.  
  22. //here begin handle critical
  23. .pipe(criticalCss())
  24. .pipe(rename({suffix: '.min'}))
  25. .pipe(cssmin())
  26. .pipe(gulp.dest(path.dist.css))
  27. });
Add Comment
Please, Sign In to add comment