mirror of https://github.com/ColorlibHQ/gentelella
28 lines
612 B
JavaScript
28 lines
612 B
JavaScript
'use strict';
|
|
|
|
var gulp = require('gulp');
|
|
var mocha = require('gulp-mocha');
|
|
var istanbul = require('gulp-istanbul');
|
|
var eslint = require('gulp-eslint');
|
|
|
|
var lint = ['index.js', 'lib/*.js', 'test/*.js'];
|
|
|
|
gulp.task('coverage', function () {
|
|
return gulp.src(lint)
|
|
.pipe(istanbul())
|
|
.pipe(istanbul.hookRequire());
|
|
});
|
|
|
|
gulp.task('mocha', ['coverage'], function () {
|
|
return gulp.src('test/*.js')
|
|
.pipe(mocha({reporter: 'spec'}))
|
|
.pipe(istanbul.writeReports());
|
|
});
|
|
|
|
gulp.task('eslint', function () {
|
|
return gulp.src(lint)
|
|
.pipe(eslint())
|
|
});
|
|
|
|
gulp.task('default', ['mocha', 'eslint']);
|