-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
55 lines (45 loc) · 1.41 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
/*global require, module */
/*jslint white: true */
module.exports = function (grunt) {
'use strict';
// Load grunt npm tasks..
grunt.loadNpmTasks('grunt-shell')
grunt.loadNpmTasks('grunt-shell-spawn')
grunt.loadNpmTasks('grunt-karma')
// XXX: needed? grunt.loadNpmTasks('grunt-bower-requirejs')
/////////////////////////
// Project configuration
/////////////////////////
grunt.initConfig({
// Variables.
// These may be used in templated commands that follow.
testDir: 'test',
// Karma test configuration
karma: {
unit: {
configFile: '<%= testDir %>/karma.conf.js',
// Turn off colored output (easier to grep this way)
colors: false
}
}
});
////////////////////////////
// Register tasks //
////////////////////////////
// Wait for given number of milliseconds
grunt.registerTask('wait', 'Wait for a set amount of time.',
function(delay_ms) {
grunt.log.write('Waiting ' + delay_ms + 'ms');
setTimeout(this.async(), delay_ms);
}
);
// Task: test
// Run the Karma tests
grunt.registerTask('test', [
'karma' // run all the tests
]);
// Task: default
grunt.registerTask('default', ['test'])
// build == default
grunt.registerTask('build', ['test'])
};