在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):gavro/gulp-iconify开源软件地址(OpenSource Url):https://github.com/gavro/gulp-iconify开源编程语言(OpenSource Language):JavaScript 99.2%开源软件介绍(OpenSource Introduction):gulp-iconify'A mystical CSS icon solution', grunticon-like build system for Gulp: ' ##Usage npm install gulp-iconify --save-dev ###Simple example gulp.task('default', function() {
iconify({
src: './img/icons/*.svg'
});
}); This simple call defaults to the following:
###Customized example gulp.task('default', function() {
iconify({
src: './img/icons/*.svg',
pngOutput: './img/icons/png',
scssOutput: './scss',
cssOutput: './css',
styleTemplate: '_icon_gen.scss.mustache',
defaultWidth: '300px',
defaultHeight: '200px',
svgoOptions: {
enabled: true,
options: {
plugins: [
{ removeUnknownsAndDefaults: false },
{ mergePaths: false }
]
}
},
svg2pngOptions: {
scaling: 1.0,
verbose: true,
concurrency: null
}
});
}); Note: To disable SVGO, just set ###Example (and default) styleTemplate: .icon {
background-repeat: no-repeat;
{{#items}}
&.icon-{{slug}} {
background-image: url('{{{datauri}}}');
}
{{/items}}
} ###Example styleTemplate with height/width slugs: .icon {
background-repeat: no-repeat;
{{#items}}
&.icon-{{slug}} {
background-image: url('{{{datauri}}}');
width: {{width}}px;
height: {{height}}px;
}
{{/items}}
} |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论