forked from theonion/videojs-vast-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
77 lines (69 loc) · 1.6 KB
/
Gruntfile.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
'use strict';
var specs = "spec/*Spec.js",
helpers = "spec/*Helpers.js";
var _ = require('lodash');
var gruntConfig = {
env: {
// dynamically filled
},
jshint: {
ignore_warning: {
options: {
'-W083': true,
},
src: ['videojs.vast.js', specs],
},
},
// jasmine: {
// src: 'videojs.vast.js',
// options: {
// specs: specs,
// helpers: helpers,
// vendor: [
// "http://vjs.zencdn.net/4.4.3/video.js",
// "bower_components/videojs-contrib-ads/src/videojs.ads.js",
// "lib/vast-client.js"
// ]
// }
// },
karma: {
unit: {
configFile: 'karma.conf.js'
}
},
coveralls: {
options: {
coverage_dir: './coverage',
force: true,
recursive: true
}
},
connect: {
server: {
options: {
keepalive: true
}
}
},
watch: {
scripts: {
files: ['*.js', 'spec/*.js'],
tasks: ['jshint', 'jasmine']
},
}
};
module.exports = function(grunt) {
grunt.initConfig(gruntConfig);
grunt.loadNpmTasks('grunt-env');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-karma-coveralls');
grunt.loadNpmTasks('grunt-karma');
grunt.registerTask('default', ['test:sauce:' + _(desireds).keys().first()]);
_(desireds).each(function(desired, key) {
grunt.registerTask('test:sauce:' + key, ['env:' + key, 'simplemocha:sauce']);
});
grunt.registerTask('default', ['jshint', 'karma']);
};