-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (32 loc) · 821 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
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var eslint = require('gulp-eslint');
var jscs = require('gulp-jscs');
gulp.task('eslint', function() {
return gulp.src(['src/script/*.js',
'src/script/*/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError());
});
gulp.task('test', ['eslint', 'jscs']);
gulp.task('jscs', function () {
gulp.src(['src/script/*.js',
'src/script/*/*.js'])
.pipe(jscs());
});
gulp.task('connect', function () {
return browserSync.init({
files: [
'index.html',
'src/style/*.css',
'src/script/*/*.js',
'src/script/*.js'
],
port: 3000,
logConnections: true,
notify: false,
server: './'
});
});
gulp.task('default',['connect']);