-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
44 lines (37 loc) · 1.25 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
// Generated on 2015-06-19 using generator-angular 0.11.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-conventional-changelog');
// Default task.
grunt.registerTask('default', ['jshint', 'karma']);
var testConfig = function(configFile, customOptions) {
var options = { configFile: configFile, keepalive: true };
var travisOptions = process.env.TRAVIS && { browsers: ['Firefox'], reporters: 'dots' };
return grunt.util._.extend(options, customOptions, travisOptions);
};
// Project configuration.
grunt.initConfig({
karma: {
options: testConfig('test/karma.conf.js'),
singleRun: true
},
jshint:{
files:['src/**/*.js', 'test/**/*.spec.js', 'demo/**/*.js'],
options: {
jshintrc: '.jshintrc'
}
},
changelog: {
options: {
dest: 'CHANGELOG.md'
}
}
});
};