Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- module.exports = function() {
- $.gulp.task('sprite:svg', function() {
- return $.gulp.src('./src/sprite/*.svg')
- .pipe($.gp.svgmin({
- js2svg: {
- pretty: true
- }
- }))
- .pipe($.gp.cheerio({
- run: function ($) {
- $('[fill]').removeAttr('fill');
- $('[stroke]').removeAttr('stroke');
- $('[style]').removeAttr('style');
- },
- parserOptions: { xmlMode: true }
- }))
- .pipe($.gp.replace('>', '>'))
- .pipe($.gp.svgSprite({
- mode: {
- symbol: {
- sprite: "../sprite.svg"
- }
- }
- }))
- .pipe($.gulp.dest($.config.root + '/img'))
- })
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement