forked from mozilla/bedrock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
30 lines (25 loc) · 788 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
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global __dirname, require */
var gulp = require('gulp');
var karma = require('karma');
var eslint = require('gulp-eslint');
var lintPaths = [
'media/js/**/*.js',
'!media/js/libs/*.js',
'tests/unit/spec/**/*.js',
'gulpfile.js'
];
gulp.task('test', function(done) {
new karma.Server({
configFile: __dirname + '/tests/unit/karma.conf.js',
singleRun: true
}, done).start();
});
gulp.task('lint', function() {
return gulp.src(lintPaths)
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});