File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ var csslint = require('csslint').CSSLint;
1010
1111var formatOutput = function ( report , file , options ) {
1212 if ( ! report . messages . length ) {
13- return {
13+ return {
1414 success : true
1515 } ;
1616 }
@@ -81,8 +81,6 @@ var cssLintPlugin = function(options) {
8181var defaultReporter = function ( file ) {
8282 var errorCount = file . csslint . errorCount ;
8383 var plural = errorCount === 1 ? '' : 's' ;
84-
85- process . stderr . write ( '\x07' ) ; // Send a beep to the terminal so it bounces
8684
8785 gutil . log ( c . cyan ( errorCount ) + ' error' + plural + ' found in ' + c . magenta ( file . path ) ) ;
8886
@@ -124,4 +122,15 @@ cssLintPlugin.reporter = function(customReporter) {
124122 } ) ;
125123} ;
126124
125+ cssLintPlugin . failReporter = function ( ) {
126+ return es . map ( function ( file , cb ) {
127+ // Nothing to report or no errors
128+ if ( ! file . csslint || file . csslint . success ) {
129+ return cb ( null , file ) ;
130+ }
131+
132+ return cb ( new gutil . PluginError ( 'gulp-csslint' , 'CSSLint failed for ' + file . relative ) , file ) ;
133+ } ) ;
134+ } ;
135+
127136module . exports = cssLintPlugin ;
Original file line number Diff line number Diff line change 44 "description" : " CSSLint plugin for gulp" ,
55 "main" : " index.js" ,
66 "dependencies" : {
7- "csslint" : " ~ 0.10.0" ,
8- "gulp-util " : " ~ 1.2.0 " ,
9- "event-stream " : " ~3.0.18 "
7+ "csslint" : " ^ 0.10.0" ,
8+ "event-stream " : " ^3. 1.2" ,
9+ "gulp-util " : " ^2.2.14 "
1010 },
1111 "devDependencies" : {
12- "should " : " ~2.1.1 " ,
13- "mocha " : " ~1.15 .1"
12+ "mocha " : " ^1.18.2 " ,
13+ "should " : " ^3.3 .1"
1414 },
1515 "scripts" : {
1616 "test" : " ./node_modules/.bin/mocha"
You can’t perform that action at this time.
0 commit comments