-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.js
More file actions
53 lines (44 loc) · 1.22 KB
/
Gruntfile.js
File metadata and controls
53 lines (44 loc) · 1.22 KB
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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['Gruntfile.js', 'geocens.js', 'geocens-chart.js', 'geocens-map.js', 'test/*.js'],
options: {
expr: true,
globals: {
jQuery: true,
console: true,
module: true
}
}
},
qunit: {
files: ['test/**/*.html']
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> complete <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
my_target: {
files: {
'geocens.min.js': ['geocens.js', 'geocens-chart.js', 'geocens-map.js']
}
}
},
watch: {
files: ['<%= jshint.files %>', 'test/index.html'],
tasks: ['jshint', 'qunit']
}
});
// Load the plugins
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
// Tasks
grunt.registerTask('test', ['jshint', 'qunit']);
// Default task(s).
grunt.registerTask('default', ['jshint', 'qunit', 'uglify']);
};