How to assemble the svg sprite, and use?

Good evening!
For a couple of hours looking for a good plugin for gulp, to make it easy to collect and use svg sprite.
3-4 pieces tried :( All as it is not working. The picture is, but the scale won't budge.
Tell me what and how?
Thank you! :)
ps: probably I do not catch up in working with svg and how to use it, which is likely :((
but I really want to use it.
pss: please help me who know. :)
July 8th 19 at 16:39
3 answers
July 8th 19 at 16:41
Solution
https://una.im/svg-icons/
excellent article with detailed examples, try to repeat the build, and it does not turn out - write, otherwise it is not clear what your problem is and what to help you.
problems icon in the course. thank you :) I will read and try. I want to feel the power of svg :)) - bell commented on July 8th 19 at 16:44
: have you seen, thank you) - bell commented on July 8th 19 at 16:47
: buildplace I need with this plugin :) a bunch of settings, and how to cook it properly and it was convenient not found :( and everything is exactly as I need! :) thank you very much!!! :)) - bell commented on July 8th 19 at 16:50
July 8th 19 at 16:43
here is my config. Use the mode symbol. In the src folder and throw the svg. In the out folder looking for html examples of usage. Here read more
var gulp = require('gulp');
var svgSprite = require('gulp-svg-sprite');

config = {
 shape : {
 transform : [
 {svgo : {
 plugins : [
 {removeUselessStrokeAndFill: true}
]
}}
],

 dimension : { // Set maximum dimensions
 maxWidth : 128,
 maxHeight : 128
}
},
 mode : {
 symbol: {
 example : true
}
}

};




gulp.task('sprite', function () {
gulp.src('src/**/*.svg')
.pipe(svgSprite(config))
.pipe(gulp.dest('out'));
});

gulp.task('default', ['sprite']);
July 8th 19 at 16:45
I propose a better solution is to make your svg icon font
an icon is configured. but he's got flaws and a bit too much. that's only if you can not find a good and convenient solution with the svg icon will be used - bell commented on July 8th 19 at 16:48
Disadvantages of icon fonts in practice:
- Cannot be used as a background
- You cannot use multi-color icons
Pros:
- Optimized the size
- Comfortable working
- Expandable to any size
- Ability to specify any color
- Slips and transform icons - bell commented on July 8th 19 at 16:51
: nope, the disadvantages will more :) svg is even less weigh and better clinging, namely styles, and even logic it is possible to hang :) it's a pleasure to work with svg. be sure to try. bitblit, which is higher, a chic thing :) - bell commented on July 8th 19 at 16:54

Find more questions by tags SVGGulp.js