Skip to content

Instantly share code, notes, and snippets.

@destroytoday
Created February 6, 2015 00:34
Show Gist options
  • Save destroytoday/ac6693da1287eaae62a7 to your computer and use it in GitHub Desktop.
Save destroytoday/ac6693da1287eaae62a7 to your computer and use it in GitHub Desktop.
var gulp = require('gulp');
var svgSprite = require('gulp-svg-sprite');
gulp.task('svgs', function() {
return gulp.src('./app/assets/images/**/*.svg')
.pipe(svgSprite({
transform: [{
svgo: {
plugins: [{ removeUnknownsAndDefaults: false }]
}
}],
mode: {
css: {
dest: '',
prefix: '',
bust: false, // disable cache buster
dimensions: true,
common: 'sprite', // ignore
sprite: './public/assets/images/card-icon-sprite.svg',
render: {
scss: {
dest: './tmp/assets/styles/includes/_sprites.scss'
}
}
}
}
}))
.pipe(gulp.dest('./'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment