0.2.18 • Published 4 years ago
gulp-svg-mixer v0.2.18
gulp-svg-mixer
Gulp plugin for creating SVG sprites.
Installation
npm install gulp-svg-mixer
Usage
const gulp = require('gulp');
const mixer = require('gulp-svg-mixer');
gulp.src('img/*.svg')
.pipe(mixer())
.pipe(gulp.dest('build'));
Configuration
sprite.type
Type:
string
Default:classic
See svg-mixer.spriteType for details.
sprite.filename
Type:
string
Default:'sprite.svg'
Name of generated sprite file.
css.filename
Type:
string
Default:'sprite-styles.css'
Name of generated CSS file.
css.selector
Type:
string
Default:'.[symbol-id]'
CSS selector for generate symbol styles. [symbol-id]
will be replaced by
actual symbol id.
css.aspectRatio
Type:
boolean
Default:true
Generate aspect ratio CSS styles.
prettify
Type:
boolean
Default:true
Prettify SVG and CSS output.
Examples
const gulp = require('gulp');
const mixer = require('gulp-svg-mixer');
gulp.src('img/*.svg')
.pipe(mixer({
sprite: { type: 'stack', filename: 'stack-sprite.svg' },
css: { selector: '#[symbol-id]' }
}))
.pipe(gulp.dest('build'));
LICENSE
0.2.18
4 years ago
0.2.17
4 years ago
0.2.16
4 years ago
0.2.14
5 years ago
0.2.13
5 years ago
0.2.12
5 years ago
0.2.11
5 years ago
0.2.10
6 years ago
0.2.9
6 years ago
0.2.8
6 years ago
0.2.7
6 years ago
0.2.6
6 years ago
0.2.5
6 years ago
0.2.4
6 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.0
6 years ago