Skip to content

Instantly share code, notes, and snippets.

@dstroot
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dstroot/41553de0eb13522e0d4d to your computer and use it in GitHub Desktop.
Save dstroot/41553de0eb13522e0d4d to your computer and use it in GitHub Desktop.
issue with gulp-jscs
{
"disallowTrailingComma": true,
"requireSpaceAfterLineComment": true,
"requireSpacesInConditionalExpression": true
}
'use strict';
/**
* Dependencies
*/
var gulp = require('gulp');
// load gulp plugins
var $ = require('gulp-load-plugins')();
/**
* JSCS Files
*/
gulp.task('jscs', function () {
// Monkey business to handle jscs errors without stopping gulp
var j = $.jscs();
j.on('error', function (e) {
// $.util.log(e);
j.end();
});
return gulp.src('gulpfile.js')
.pipe(j);
});
/**
* Watch Files (Rerun/reload when a file changes)
*/
gulp.task('watch', function () {
gulp.watch('gulpfile.js', ['jscs']);
});
/**
* Default Task
* (depends on Build and Develop Tasks)
*/
gulp.task('default', ['jscs', 'watch']);
{
"private": true,
"scripts": {
"start": "gulp"
},
"engines": {
"node": "~0.10.0"
},
"devDependencies": {
"gulp": "~3.8.5",
"gulp-load-plugins": "*",
"gulp-jscs": "~0.6.0",
"gulp-watch": "~0.6.8",
"gulp-util": "~2.2.19"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment