Skip to content

Instantly share code, notes, and snippets.

@danfisher85
Created August 1, 2019 12:09
Show Gist options
  • Save danfisher85/2a4628a3ea356ec3307bf021420f1d5e to your computer and use it in GitHub Desktop.
Save danfisher85/2a4628a3ea356ec3307bf021420f1d5e to your computer and use it in GitHub Desktop.
// Creates sprites from SVG files.
gulp.task('sprites', function() {
return gulp
.src(PATHS.src_img + '/sprites/**/*.svg')
.pipe(svgSprites({
cssFile: 'assets/scss/components/_sprites.scss',
common: 'icon-svg',
padding: 0,
baseSize: 10,
templates: {
scss: true
},
preview: false,
svg: {
sprite: 'assets/images/sprite.svg'
},
svgPath: "../images/sprite.svg",
pngPath: "../images/sprite.svg"
}))
.pipe(gulp.dest(PATHS.src));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment