0.0.2 • Published 9 years ago
gulp-csslint-teamcity v0.0.2
A team city reporter for gulp-csslint (Inspired by jshint-teamcity)
Usage
First, install gulp-csslint-teamcity
as a development dependency:
npm install --save-dev gulp-csslint
Then, add it to your gulpfile.js
:
var teamcity = require('gulp-csslint-teamcity');
gulp.task('css', function () {
gulp.src('client/css/*.css')
.pipe(csslint())
.pipe(csslint.reporter(teamcity));
});
Unfortunately this is going to fill your console window with ugly csslint errors that are only intended for teamcity. What you really want to do is use gulp-utilhttps://github.com/gulpjs/gulp-util to have the reporter only used in a team city build:
var gutil = require('gulp-util');
var teamcity = require('gulp-csslint-teamcity');
gulp.task('css', function () {
gulp.src('client/css/*.css')
.pipe(csslint())
.pipe(csslint.reporter(gutil.env.teamcity ? teamcity : undefined));
});
Then make sure teamcity builds the project with the --teamcity argument:
gulp build --teamcity
0.0.2
9 years ago