forked from mozilla-iam/sso-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
41 lines (34 loc) · 925 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* global require */
var gulp = require('gulp');
var mainBowerFiles = require('gulp-main-bower-files');
var eslint = require('gulp-eslint');
var stylelint = require('gulp-stylelint');
var lintPathsJS = [
'dashboard/static/js/*.js',
'gulpfile.js'
];
var lintPathsCSS = [
'dashboard/static/css/*.css'
];
gulp.task('js:lint', () => {
return gulp.src(lintPathsJS)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('css:lint', () => {
return gulp.src(lintPathsCSS)
.pipe(stylelint({
reporters: [{ formatter: 'string', console: true}]
}));
});
gulp.task('bower', function(){
return gulp.src('./bower.json')
.pipe(mainBowerFiles())
.pipe(gulp.dest('./dashboard/static/lib'));
});
gulp.task('default', function() {
gulp.start('bower');
gulp.start('js:lint');
gulp.start('css:lint');
});