-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
54 lines (53 loc) · 1.84 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
module.exports = function(grunt) {
grunt.initConfig({
concat: {
dist: {
src: ['src/directives/openlayers.js',
'src/directives/center.js',
'src/directives/layer.js',
'src/directives/events.js',
'src/directives/path.js',
'src/directives/view.js',
'src/directives/control.js',
'src/directives/marker.js',
'src/services/olData.js',
'src/services/olHelpers.js',
'src/services/olMapDefaults.js'
],
dest: 'dist/angular-openlayers-directive.js'
}
},
cssmin: {
target: {
files: {
'dist/angular-openlayers-directive.css': ['css/*']
}
}
},
uglify: {
options: {
mangle: false
},
complete: {
files: {
'dist/angular-openlayers-directive.min.js': ['dist/angular-openlayers-directive.js']
}
}
},
clean: {
'all': ["dist/angular-openlayers-directive.js","dist/angular-openlayers-directive.min.js","dist/angular-openlayers-directive.css"]
},
watch:{
scripts: {
files: ['src/directives/*.js','src/services/*.js'],
tasks: ['clean','cssmin','concat','uglify']
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['clean','cssmin','concat','uglify']);
};