This repository has been archived by the owner on Apr 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
108 lines (104 loc) · 3.83 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
htmlmin: {
dist: {
options: { // Target options
removeComments: true,
collapseWhitespace: true
},
files: [{
expand: true,
src: './_site/**/*.html',
ext: '.html'
}]
}
},
cssmin: {
options: {
keepSpecialComments: 0
},
target: {
files: [{
expand: true,
cwd: '_site/css',
src: ['*.css', '!*.min.css'],
dest: '_site/css',
ext: '.css'
}]
}
},
realFavicon: {
favicons: {
src: './images/logo.svg',
dest: './_site',
options: {
iconsPath: './',
design: {
ios: {
pictureAspect: 'backgroundAndMargin',
backgroundColor: '#ffffff',
margin: '14%',
assets: {
ios6AndPriorIcons: false,
ios7AndLaterIcons: false,
precomposedIcons: false,
declareOnlyDefaultIcon: true
}
},
desktopBrowser: {},
windows: {
pictureAspect: 'whiteSilhouette',
backgroundColor: '#6e83e5',
onConflict: 'override',
assets: {
windows80Ie10Tile: false,
windows10Ie11EdgeTiles: {
small: true,
medium: true,
big: true,
rectangle: true
}
}
},
androidChrome: {
pictureAspect: 'noChange',
themeColor: '#6e83e5',
manifest: {
display: 'standalone',
orientation: 'notSet',
onConflict: 'override',
declared: true
},
assets: {
legacyIcon: true,
lowResolutionIcons: false
}
},
safariPinnedTab: {
pictureAspect: 'silhouette',
themeColor: '#6e83e5'
}
},
settings: {
scalingAlgorithm: 'Mitchell',
errorOnImageTooSmall: false,
readmeFile: false,
htmlCodeFile: false,
usePathAsIs: false
}
}
}
},
clean: {
favicons: {
src: ['_site/safari-pinned-tab.svg', '_site/site.webmanifest']
}
}
});
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-real-favicon');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['htmlmin', 'cssmin', 'realFavicon', 'clean']);
};