forked from Otouto/gulp-raster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGulpfile.js
34 lines (28 loc) · 816 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
'use strict';
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
mocha = require('gulp-mocha'),
stylish = require('jshint-stylish'),
runSequence = require('run-sequence');
gulp.task('jshint', function () {
// Minify and copy all JavaScript (except vendor scripts)
return gulp.src(['./lib/**/*.js', './index.js'])
.pipe(jshint())
.pipe(jshint.reporter(stylish));
});
// Copy all static images
gulp.task('mocha', function () {
return gulp.src('./test/*.js')
.pipe(mocha({
globals: ['chai'],
timeout: 6000,
ignoreLeaks: false,
ui: 'bdd',
reporter: 'spec'
}));
});
gulp.task('test', function (done) {
runSequence('mocha', done);
});
// The default task (called when you run `gulp` from cli)
gulp.task('default', ['jshint', 'mocha']);