forked from WebediaGaming/react-nexus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
31 lines (27 loc) · 661 Bytes
/
gulpfile.js
File metadata and controls
31 lines (27 loc) · 661 Bytes
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
/* eslint-disable no-var, vars-on-top */
require('babel/register')({
only: /\.jsx$/,
optional: [
'runtime',
'es7.classProperties',
'es7.decorators',
'es7.objectRestSpread',
],
});
var eslint = require('gulp-eslint');
var gulp = require('gulp');
var plumber = require('gulp-plumber');
var mocha = require('gulp-mocha');
function lint() {
return gulp.src(['src/**/*.js', 'src/**/*.jsx'])
.pipe(plumber())
.pipe(eslint())
.pipe(eslint.format());
}
function test() {
return gulp.src('src/__tests__/**/*.jsx')
.pipe(mocha());
}
gulp.task('lint', lint);
gulp.task('test', ['lint'], test);
gulp.task('default', ['test']);