Skip to content

raiseandfall/gulp-cssmyicons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS my icons

Build Status Downloads

Gulp plugin to generate a CSS file for SVG icons used as background-image:

.icon-home{background-image:url('icons/home.svg');background:no-repeat;}

There are also versions for Grunt and Broccoli

INSTALL

$ npm install gulp-cssmyicons --save-dev

USAGE

var cssMyIcons = require('gulp-cssmyicons');

gulp.task('icons', function() {
  return gulp.src('images/*.svg')
    .pipe(cssMyIcons('icons.css'))
    .pipe(gulp.dest('./dist/css/'))
});

OPTIONS

cssMyIcons(file, options)

file

Type: String
Required

The icons CSS filename

options.prefix

Type: String
Optional

Prefix to add at the beginning of the icons path (see tests)

CONTRIBUTE

$ npm run test

LICENSE

MIT