-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
63 lines (54 loc) · 1.69 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
56
57
58
59
60
61
62
63
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
options: {
jshintrc: true
},
files: {
src: ['angular-elasticsearch-logger.js']
}
},
uglify: {
options : {
sourceMap: true
},
main: {
files: { 'angular-elasticsearch-logger.min.js': ['angular-elasticsearch-logger.js'] }
}
},
karma: {
unit: {
configFile: 'test/karma.conf.js',
singleRun: true
},
//continuous integration mode: run tests once in PhantomJS browser.
travis: {
configFile: 'test/karma.conf.js',
singleRun: true,
browsers: ['Chrome_travis_ci']
}
},
watch: {
jshint: {
files: ['angular-elasticsearch-logger.js'],
tasks: ['jshint']
},
karma: {
files: ['*.js', '!*.min.js'],
tasks: ['karma:unit:run'] //NOTE the :run flag
}
},
clean : {
packages: ["bower_components","node_modules","build"]
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['jshint','uglify'] );
grunt.registerTask('test', [ 'karma:travis' ] );
grunt.registerTask('test-all', ['karma:unit'] );
};