/
Gruntfile.js
47 lines (38 loc) · 879 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
module.exports = function(grunt) {
grunt.initConfig({
// Package information
pkg: '<json:package.json>',
// Linter
eslint: {
src: [
'.'
]
},
// Testing
karma: {
unit: {
configFile: 'karma.conf.js'
},
unitAtOnce: {
configFile: 'karma.conf.js',
singleRun: true
}
},
// Sync the manifest for bower.json
sync: {
all: {
options: {
sync: ['name', 'author', 'version', 'description', 'private', 'license', 'homepage', 'keywords']
}
}
}
});
// Load the modules
grunt.loadNpmTasks('gruntify-eslint'); // eslint
grunt.loadNpmTasks('grunt-karma'); // karma
grunt.loadNpmTasks('grunt-npm2bower-sync'); // sync
// Register the tasks
grunt.registerTask('dev', ['eslint', 'karma:unit']);
grunt.registerTask('test', ['eslint', 'karma:unitAtOnce']);
grunt.registerTask('default', ['sync', 'test']);
};