forked from cloudcome/alien
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
42 lines (34 loc) · 922 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
36
37
38
39
40
'use strict';
var gulp = require('gulp');
var karma = require('karma').server;
var taskList = [
'utils/allocation.js',
'utils/calendar.js',
'utils/class.js',
'utils/dato.js',
'utils/number.js',
'utils/random.js',
'utils/string.js',
'utils/typeis.js'
];
taskList.forEach(function (task) {
var preprocessors = {};
preprocessors['./src/' + task] = ['coverage'];
gulp.task(task, function (done) {
karma.start({
configFile: __dirname + '/karma.conf.js',
singleRun: true,
browsers: ['PhantomJS'],
files: [
'./examples/coolie.min.js',
{
pattern: './src/**/*.js',
included: false
},
'./test/' + task
],
preprocessors: preprocessors
}, done);
});
});
gulp.task('default', taskList);