aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'gulpfile.js')
-rw-r--r--gulpfile.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/gulpfile.js b/gulpfile.js
index a8333e950..f8ed456b0 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -21,10 +21,14 @@ var replace = require('gulp-replace')
var mkdirp = require('mkdirp')
var sass = require('gulp-sass')
var autoprefixer = require('gulp-autoprefixer')
+var gulpStylelint = require('gulp-stylelint')
+var stylefmt = require('gulp-stylefmt')
+
var disableDebugTools = gutil.env.disableDebugTools
var debug = gutil.env.debug
+
// browser reload
gulp.task('dev:reload', function() {
@@ -182,10 +186,26 @@ gulp.task('build:scss', function () {
.pipe(autoprefixer())
.pipe(gulp.dest('ui/app/css/output'))
})
-gulp.task('watch:scss', function(){
+gulp.task('watch:scss', function() {
gulp.watch(['ui/app/css/**/*.scss'], gulp.series(['build:scss']))
})
+gulp.task('lint-scss', function() {
+ return gulp
+ .src('ui/app/css/itcss/**/*.scss')
+ .pipe(gulpStylelint({
+ reporters: [
+ {formatter: 'string', console: true}
+ ]
+ }));
+});
+
+gulp.task('fmt-scss', function () {
+ return gulp.src('ui/app/css/itcss/**/*.scss')
+ .pipe(stylefmt())
+ .pipe(gulp.dest('ui/app/css/itcss'));
+});
+
// bundle tasks
var jsDevStrings = jsFiles.map(jsFile => `dev:js:${jsFile}`)