Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. const { src, dest, parallel } = require('gulp');
  2. const postcss = require('gulp-postcss');
  3. const autoprefixer = require('autoprefixer');
  4. const tailwindcss = require('tailwindcss');
  5. const purgecss = require('gulp-purgecss');
  6.  
  7. function css() {
  8. return src('./src/css/style.css')
  9. .pipe(postcss([
  10. tailwindcss('./tailwind.config.js'),
  11. autoprefixer()
  12. ]))
  13. .pipe(purgecss({
  14. content: ['./src/html/*.html'],
  15. defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
  16. }))
  17. .pipe(dest('./dist/css'));
  18.  
  19. }
  20.  
  21. exports.css = css;
  22. exports.default = parallel(css);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement