Created
May 10, 2017 14:46
-
-
Save markusvonplunkett/d700d6ca6ebf8e95d279b7528ad3e275 to your computer and use it in GitHub Desktop.
svgstore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Combines SVGs into a single file using SYMBOLS and then inserts it into templates/svg-icons.php | |
gulp.task('svgstore', function () { | |
var svgs; | |
svgs = gulp | |
.src(path.source+'/images/svg_icons/*.svg') | |
.pipe(rename({prefix: 'icon-'})) | |
// .pipe(function() { | |
// return gulpif(enabled.svgMinify, svgmin({})); | |
// }) | |
.pipe(svgstore({ inlineSvg: true })); | |
function fileContents (filePath, file) { | |
return file.contents.toString(); | |
} | |
return gulp | |
.src(path.source+'/images/svg_symbols/svg-icons.php') | |
.pipe(inject(svgs, { transform: fileContents })) | |
.pipe(gulp.dest('templates/')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment