-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
62 lines (57 loc) · 1.48 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
module.exports = function(grunt) {
grunt.initConfig({
responsive_images: {
dev: {
options: {
engine: 'im',
sizes: [{
name: 'small',
width: 350,
height: 150
}, {
name: 'medium',
width: 640
}, {
name: "large",
width: 1140,
separator: "-",
suffix: "_x2",
quality: 60
}]
},
files: [{
expand: true,
src: ['*.{jpg,gif,png}'],
cwd: 'images_src/',
dest: 'images/'
}]
}
},
copy: {
dev: {
files: [{
expand: true,
src: ['**/*', '!app/img/**/*.*'],
cwd: 'images_src/',
dest: 'images/'
}]
}
},
image_resize: {
no_overwrite: {
options: {
width: 150,
height: 150,
overwrite: false,
},
files: {
'images/Logo1-red.png': 'images_src/Logo1.png'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-responsive-images');
grunt.loadNpmTasks('grunt-image-resize');
grunt.registerTask('default',['copy', 'responsive_images', 'image_resize']);
};