https://github.com/raiseandfall/gulp-cssmyicons
Gulp plugin to generate a CSS for SVG icons
https://github.com/raiseandfall/gulp-cssmyicons
css css-icon gulp gulp-plugin svg-icons
Last synced: 24 days ago
JSON representation
Gulp plugin to generate a CSS for SVG icons
- Host: GitHub
- URL: https://github.com/raiseandfall/gulp-cssmyicons
- Owner: raiseandfall
- License: mit
- Created: 2015-10-01T23:44:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-07-10T12:46:18.000Z (almost 9 years ago)
- Last Synced: 2025-10-20T20:57:18.932Z (8 months ago)
- Topics: css, css-icon, gulp, gulp-plugin, svg-icons
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/gulp-cssmyicons
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# CSS my icons
[](https://travis-ci.org/raiseandfall/gulp-cssmyicons) [](https://www.npmjs.com/package/gulp-cssmyicons)
> [Gulp](http://gulpjs.com/) plugin to generate a CSS file for SVG icons used as background-image:
```css
.icon-home{background-image:url('icons/home.svg');background:no-repeat;}
```
> There are also versions for [Grunt](https://github.com/raiseandfall/grunt-cssmyicons) and [Broccoli](https://github.com/raiseandfall/broccoli-cssmyicons)
## [CHANGELOG](./CHANGELOG.md)
## INSTALL
```shell
$ npm install gulp-cssmyicons --save-dev
```
## USAGE
```js
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
```shell
$ npm run test
```
## LICENSE
MIT