Skip to content

Instantly share code, notes, and snippets.

@roparz
Last active August 29, 2015 14:25
Show Gist options
  • Save roparz/b358c8fe71655cd47bf9 to your computer and use it in GitHub Desktop.
Save roparz/b358c8fe71655cd47bf9 to your computer and use it in GitHub Desktop.
gulp-sniffer - check css exemples
var gulp = require('gulp'),
sniffer = require('gulp-sniffer');
var sniffs = {
'Use lighter|normal|bold instead of 100-900 for font-weight': function(content) {
return content.match(/font-weight: \d+/);
}
}
gulp.task('check-css', function() {
gulp.src('src/**/*.css')
.pipe(sniffer(sniffs))
.pipe(gulp.dest('dist/'))
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment