-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
39 lines (31 loc) · 955 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
/* jshint strict: false */
/* globals process */
var gulp = require('gulp');
var bump = require('gulp-bump');
var jshint = require('gulp-jshint');
var csslint = require('gulp-csslint');
var htmlhint = require('gulp-htmlhint');
gulp.task('bump', function() {
var typeIndex = process.argv.indexOf('--type') + 1,
type = typeIndex? process.argv[typeIndex]: 'patch';
gulp.src(['./package.json', './bower.json'])
.pipe(bump({type: type}))
.pipe(gulp.dest('./'));
});
gulp.task('jshint', function() {
return gulp.src('modules/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('csslint', function() {
return gulp.src('style/*.css')
.pipe(csslint())
.pipe(csslint.reporter());
});
gulp.task('htmlhint', function() {
return gulp.src('templates/*.html')
.pipe(htmlhint('.htmlhintrc'))
.pipe(htmlhint.reporter());
});
gulp.task('lint', ['jshint', 'csslint', 'htmlhint']);
gulp.task('default', ['lint']);