-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
38 lines (33 loc) · 876 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
'use strict';
// Include Gulp & Tools We'll Use
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var runSequence = require('run-sequence');
var bump = require('gulp-bump');
var src = ['weekday-selector.html',
'weekday-selector.js',
'test/*.js',
'test/*.html'];
//Lint JavaScript
gulp.task('lint', function () {
return gulp.src(src)
.pipe($.if('*.html', $.htmlExtract()))
.pipe($.jshint())
.pipe($.jscs())
.pipe($.jscsStylish.combineWithHintResults())
.pipe($.jshint.reporter('jshint-stylish'))
.pipe($.jshint.reporter('fail'));
});
gulp.task('bump', function(){
gulp.src('./bower.json')
.pipe(bump())
.pipe(gulp.dest('./'));
});
gulp.task('default', function (callback) {
runSequence(
'lint',
callback);
});
gulp.task('watch', function () {
gulp.watch(src, ['default']);
});