With Gulp
Start by installing the Gulp plugin as a dev dependency.
1
npm i -D gulp-purgecss
Copied!
1
const gulp = require('gulp')
2
const purgecss = require('gulp-purgecss')
3
4
gulp.task('purgecss', () => {
5
return gulp
6
.src('src/**/*.css')
7
.pipe(
8
purgecss({
9
content: ['src/**/*.html']
10
})
11
)
12
.pipe(gulp.dest('build/'))
13
})
Copied!
Last modified 3yr ago
Copy link