Skip to content

Instantly share code, notes, and snippets.

@michaellouieloria
Created September 18, 2014 05:25
Show Gist options
  • Save michaellouieloria/844a6305d31771cc5db9 to your computer and use it in GitHub Desktop.
Save michaellouieloria/844a6305d31771cc5db9 to your computer and use it in GitHub Desktop.
Gulp Uncss multiple files
npm install glob --save-dev
npm install gulp-uncss --save-dev
var uncss = require('gulp-uncss');
var glob = require('glob');
gulp.task('uncss', function() {
gulp.src('public/css/dirty.css')
.pipe(uncss({
html: glob.sync('app/views/**/*.*')
}))
.pipe(gulp.dest('public/css/clean.css'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment