Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { src, dest, parallel } = require('gulp');
- const postcss = require('gulp-postcss');
- const autoprefixer = require('autoprefixer');
- const tailwindcss = require('tailwindcss');
- const purgecss = require('gulp-purgecss');
- function css() {
- return src('./src/css/style.css')
- .pipe(postcss([
- tailwindcss('./tailwind.config.js'),
- autoprefixer()
- ]))
- .pipe(purgecss({
- content: ['./src/html/*.html'],
- defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
- }))
- .pipe(dest('./dist/css'));
- }
- exports.css = css;
- exports.default = parallel(css);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement