-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
41 lines (38 loc) · 1.39 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
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-grunticon');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
path: {
tmp : '.tmp',
srcImages : 'src/assets/images',
distImages : 'dist/assets/images'
},
grunticon: {
sprite: {
files: [{
expand: true,
cwd: '<%= path.srcImages %>/svg-icons',
src: ['*.svg', '*.png'],
dest: '<%= path.tmp %>'
}],
options: {
// cssprefix : '.svg-',
customselectors : {
'*' : [
'.svgbefore-$1:before',
'.svgafter-$1:after',
'.svgcontain-$1 .svg-icon']
},
datasvgcss : 'sprite-svg.css',
datapngcss : 'sprite-png.css',
urlpngcss : 'sprite-fallback.css',
pngfolder : '../<%= path.distImages %>/sprite-fallback',
pngpath : '../images/sprite-fallback',
compressPNG : true,
enhanceSVG : true
}
}
}
});
grunt.registerTask('default', []);
};