-
Notifications
You must be signed in to change notification settings - Fork 9
/
Gruntfile.js
39 lines (32 loc) · 983 Bytes
/
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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
html2js: {
main: {
src: ['src/**/*.html'],
dest: 'src/templates.js'
}
},
karma: {
unit: {
configFile: 'karma.conf.js',
singleRun: false,
autoWatch: true
},
coverage: {
configFile: 'karma.conf.js'
}
},
open:{
coverage: {
path: './coverage/view/index.html'
}
}
});
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-html2js');
grunt.loadNpmTasks('grunt-open');
grunt.registerTask('default', ['html2js', 'karma:unit']);
grunt.registerTask('test', ['html2js', 'karma:unit', 'open:coverage']);
grunt.registerTask('coverage', ['html2js', 'karma:coverage', 'open:coverage']);
};