'A mystical CSS icon solution', grunticon-like build system for Gulp:
'grunticon is a Grunt.js gulp-iconify is a gulp task that makes it easy to manage icons and background images for all devices, preferring HD (retina) SVG icons but also provides fallback support for standard definition browsers, and old browsers alike. From a CSS perspective, it's easy to use, as it generates a class referencing each icon, and doesn't use CSS sprites.'
##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:
- Rendered PNGs will be saved in: './img/icons/png'
- Rendered SCSS files will NOT be saved
- Rendered CSS files will be saved in: './css'
- The default styleTemplate fill be used (see below)
###Customized example
gulp.task('default', function() {
iconify({
src: './img/icons/*.svg',
pngOutput: './img/icons/png',
scssOutput: './scss',
cssOutput: './css',
styleTemplate: '_icon_gen.scss.mustache'
});
});
###Example (and default) styleTemplate:
.icon {
background-repeat: no-repeat;
{{#items}}
&.icon-{{slug}} {
background-image: url('{{{datauri}}}');
}
{{/items}}
}