mirror of https://github.com/snachodog/mybuddy.git
Add "lint" gulp command with sass linting.
This commit is contained in:
parent
0f079c14fa
commit
0c5c3b7a2c
|
@ -0,0 +1,26 @@
|
|||
var gulp = require('gulp');
|
||||
|
||||
var sassLint = require('gulp-sass-lint');
|
||||
var pump = require('pump');
|
||||
|
||||
var watchConfig = require('../config.js').watchConfig;
|
||||
|
||||
|
||||
gulp.task('lint', ['lint:styles']);
|
||||
|
||||
gulp.task('lint:styles', function(cb) {
|
||||
pump([
|
||||
gulp.src(watchConfig.stylesGlob),
|
||||
sassLint({
|
||||
rules: {
|
||||
'declarations-before-nesting': 1,
|
||||
'indentation': [ 1, { 'size': 4 } ],
|
||||
'no-ids': 0,
|
||||
'no-vendor-prefixes': 2,
|
||||
'property-sort-order': 0
|
||||
}
|
||||
}),
|
||||
sassLint.format(),
|
||||
sassLint.failOnError()
|
||||
], cb);
|
||||
});
|
|
@ -10,6 +10,7 @@
|
|||
"gulp-csso": "^3.0.0",
|
||||
"gulp-sass": "^3.1.0",
|
||||
"gulp-sass-glob": "^1.0.8",
|
||||
"gulp-sass-lint": "^1.3.2",
|
||||
"gulp-uglify": "^3.0.0",
|
||||
"jquery": "^3.2.1",
|
||||
"moment": "^2.18.1",
|
||||
|
|
Loading…
Reference in New Issue