-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
47 lines (43 loc) · 865 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
39
40
41
42
43
44
45
46
47
'use strict'
var pkg = require('./bower.json')
module.exports = function(grunt){
require('load-grunt-tasks')(grunt);
grunt.initConfig({
express: {
"main": {
options: {
script: "server.js"
}
}
},
watch: {
options: {
livereload: true,
livereloadOnError: false,
spawn: false
},
files:['src/**/*.js'],
tasks:['karma:during_watch']
},
jshint: {
src: ['src/**/*.js']
},
karma: {
options: {
frameworks: ['jasmine'],
files: ['src/**/*.js'],
logLevel: 'ERROR',
autowatch: true,
singleRun: true
},
during_watch: {
browsers: ['Chrome']
},
build: {
browsers: ['Chrome', 'Firefox', 'IE']
}
}
});
grunt.registerTask('build', ['express', 'karma:build']);
grunt.registerTask('serve', ['jshint', 'express', 'watch']);
}