Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.16 KB

README.md

File metadata and controls

54 lines (37 loc) · 1.16 KB

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