forked from neveldo/mapael-maps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
64 lines (60 loc) · 2 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
64
/* Src File listing
Format:
"map_dir/*.js", "!map_dir/*.min.js"
The second part is to avoid to use the min file
*/
src_file_listing = [
'algeria/*.js', '!algeria/*.min.js',
'argentina/*.js', '!argentina/*.min.js',
'belgium/*.js', '!belgium/*.min.js',
'canada/*.js', '!canada/*.min.js',
'croatia/*.js', '!croatia/*.min.js',
'england/*.js', '!england/*.min.js',
'european_union/*.js', '!european_union/*.min.js',
'france/*.js', '!france/*.min.js',
'germany/*.js', '!germany/*.min.js',
'laos/*.js', '!laos/*.min.js',
'india/*.js', '!india/*.min.js',
'mexico/*.js', '!mexico/*.min.js',
'netherlands/*.js', '!netherlands/*.min.js',
'poland/*.js', '!poland/*.min.js',
'scandinavia/*.js', '!scandinavia/*.min.js',
'thailand/*.js', '!thailand/*.min.js',
'srilanka/*.js', '!srilanka/*.min.js',
'thailand/*.js', '!thailand/*.min.js',
'ukraine/*.js', '!ukraine/*.min.js',
'united_kingdom/*.js', '!united_kingdom/*.min.js',
'wales/*.js', '!wales/*.min.js'
];
module.exports = function (grunt) {
grunt.initConfig({
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: src_file_listing
},
uglify: {
options: {
compress: true,
mangle: true,
preserveComments: 'some',
report: 'gzip',
screwIE8: false
},
build: {
files: [
{
expand: true, // Enable dynamic expansion.
src: src_file_listing,
ext: '.min.js', // Dest filepaths will have this extension.
extDot: 'last' // Extensions in filenames begin after the last dot
}
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['jshint', 'uglify']);
};