[enh] Add CSS Lint task.

This commit is contained in:
opi 2015-09-03 09:31:04 +02:00
parent d1c3ebe22c
commit 6fcc90e076
3 changed files with 17 additions and 1 deletions

5
.gitignore vendored
View file

@ -5,4 +5,7 @@ node_modules
npm-debug.log npm-debug.log
# Symlink to ca.crt file # Symlink to ca.crt file
ca.crt ca.crt
# Debug CSS file
src/css/style.css

View file

@ -4,6 +4,7 @@ var gulp = require('gulp');
// Include required Gulp packages // Include required Gulp packages
var concat = require('gulp-concat'), var concat = require('gulp-concat'),
uglify = require('gulp-uglify'), uglify = require('gulp-uglify'),
csslint = require('gulp-csslint'),
jshint = require('gulp-jshint'), jshint = require('gulp-jshint'),
less = require('gulp-less'), less = require('gulp-less'),
autoprefixer = require('gulp-autoprefixer'), autoprefixer = require('gulp-autoprefixer'),
@ -68,6 +69,17 @@ gulp.task('css', function () {
}); });
// CSS/Less lint task
gulp.task('css-lint', function() {
return gulp.src('css/style.less')
.pipe(less())
.pipe(autoprefixer())
.pipe(csslint())
.pipe(csslint.reporter('compact'))
.pipe(gulp.dest('./css/'))
});
// Images task // Images task
gulp.task('img', function () { gulp.task('img', function () {
return gulp.src('img/*') return gulp.src('img/*')

View file

@ -15,6 +15,7 @@
"gulp": "^3.9.0", "gulp": "^3.9.0",
"gulp-autoprefixer": "^2.3.1", "gulp-autoprefixer": "^2.3.1",
"gulp-concat": "^2.6.0", "gulp-concat": "^2.6.0",
"gulp-csslint": "^0.2.0",
"gulp-cssmin": "^0.1.7", "gulp-cssmin": "^0.1.7",
"gulp-imagemin": "^2.3.0", "gulp-imagemin": "^2.3.0",
"gulp-jshint": "^1.11.2", "gulp-jshint": "^1.11.2",