-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
116 lines (113 loc) · 3.29 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
module.exports = function(grunt) {
grunt.initConfig({
responsive_images: {
dev: {
options: {
engine: "im",
sizes: [
{ name: "sm", suffix: "_1x", quality: 70, width: 512 },
{ name: "sm", suffix: "_2x", quality: 70, width: 1024 },
{ name: "md", suffix: "_1x", quality: 70, width: 720 },
{ name: "md", suffix: "_2x", quality: 70, width: 1440 },
{ name: "lg", suffix: "_1x", quality: 70, width: 1280 },
{ name: "lg", suffix: "_2x", quality: 70, width: 2560 }
]
},
files: [
{
expand: true,
src: ["**/*.{jpg,png}"],
cwd: "src/assets/background/src/",
dest: "src/assets/background/dest/"
}
]
}
},
cwebp: {
dynamic: {
options: {
q: 70
},
files: [
{
expand: true,
cwd: "src/assets/background/dest/",
src: ["**/*.{jpg,png}"],
dest: "src/assets/background/dest/"
}
]
}
},
realFavicon: {
favicons: {
src: "src/assets/favicon.svg",
dest: "src/assets/favicons/",
options: {
iconsPath: "src/assets/favicons/",
// html: ["src/assets/favicons/favicons.html"],
design: {
ios: {
pictureAspect: "backgroundAndMargin",
backgroundColor: "#ffffff",
margin: "14%",
assets: {
ios6AndPriorIcons: false,
ios7AndLaterIcons: true,
precomposedIcons: true,
declareOnlyDefaultIcon: true
}
},
desktopBrowser: {},
windows: {
pictureAspect: "noChange",
backgroundColor: "#da532c",
onConflict: "override",
assets: {
windows80Ie10Tile: false,
windows10Ie11EdgeTiles: {
small: false,
medium: true,
big: false,
rectangle: false
}
}
},
androidChrome: {
pictureAspect: "noChange",
themeColor: "#ffffff",
manifest: {
name: "MG",
startUrl: "https://gecht.net",
display: "standalone",
orientation: "notSet",
onConflict: "override",
declared: true
},
assets: {
legacyIcon: false,
lowResolutionIcons: false
}
},
safariPinnedTab: {
pictureAspect: "blackAndWhite",
threshold: 58.59375,
themeColor: "#5bbad5"
}
},
settings: {
compression: 1,
scalingAlgorithm: "NearestNeighbor",
errorOnImageTooSmall: false,
readmeFile: true,
htmlCodeFile: true,
usePathAsIs: false
}
}
}
}
})
grunt.loadNpmTasks("grunt-responsive-images")
grunt.loadNpmTasks("grunt-cwebp")
grunt.loadNpmTasks("grunt-real-favicon")
grunt.registerTask("default", ["responsive_images", "cwebp", "realFavicon"])
}