forked from mgechev/javascript-algorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
26 lines (22 loc) · 662 Bytes
/
gulpfile.js
File metadata and controls
26 lines (22 loc) · 662 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
'use strict';
var gulp = require('gulp');
var shell = require('gulp-shell');
var eslint = require('gulp-eslint');
var jasmine = require('gulp-jasmine');
var isWin = /^win/.test(process.platform);
gulp.task('jsdoc', shell.task([
(isWin) ?
'"node_modules/.bin/jsdoc.cmd" -c ./doc-config.json' :
'./node_modules/.bin/jsdoc -c ./doc-config.json'
]));
gulp.task('test', function () {
return gulp.src('test/**/*.spec.js')
.pipe(jasmine());
});
gulp.task('lint', function () {
return gulp.src(['src/**/*.js', 'test/**/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
gulp.task('build', ['lint', 'test']);