-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
35 lines (29 loc) · 854 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
35
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
//var shell = require('gulp-shell');
var karmaServer = require('karma').server;
var karma = require('gulp-karma');
gulp.task('lint', function () {
return gulp.src('lib/!(external)**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
});
// Run unit tests
gulp.task('test', function(done) {
// return gulp.src('./idontexist'
// [
// //'./lib/external/require.js',
// './test/**/*.js',
// './test/test-main.js'
// ]
// )
// .pipe(karma({ configFile: 'test/karma.conf.js' }))
// .on('error', function(err) { throw err; });
karmaServer.start({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, done);
});
gulp.task('default', ['lint', 'test']);