aboutsummaryrefslogtreecommitdiffstats
path: root/gulpfile.js
diff options
context:
space:
mode:
authorsdtsui <szehungdanieltsui@gmail.com>2017-08-14 16:03:16 +0800
committersdtsui <szehungdanieltsui@gmail.com>2017-08-14 16:03:16 +0800
commitb8aa529d29434978f511e67211d8a5ff9e2f553c (patch)
tree7d434f3a8958f0b3d2baca7eb15f9420be2c18d3 /gulpfile.js
parent1743ccbdb5df504eab8e3c46c18172b176578be1 (diff)
downloadtangerine-wallet-browser-b8aa529d29434978f511e67211d8a5ff9e2f553c.tar
tangerine-wallet-browser-b8aa529d29434978f511e67211d8a5ff9e2f553c.tar.gz
tangerine-wallet-browser-b8aa529d29434978f511e67211d8a5ff9e2f553c.tar.bz2
tangerine-wallet-browser-b8aa529d29434978f511e67211d8a5ff9e2f553c.tar.lz
tangerine-wallet-browser-b8aa529d29434978f511e67211d8a5ff9e2f553c.tar.xz
tangerine-wallet-browser-b8aa529d29434978f511e67211d8a5ff9e2f553c.tar.zst
tangerine-wallet-browser-b8aa529d29434978f511e67211d8a5ff9e2f553c.zip
[WIP] Add packages and tasks for linting scss
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}`)