Skip to content

Instantly share code, notes, and snippets.

@shaneparsons
Last active December 4, 2015 18:54
Show Gist options
  • Save shaneparsons/fa7315ce196e38c79530 to your computer and use it in GitHub Desktop.
Save shaneparsons/fa7315ce196e38c79530 to your computer and use it in GitHub Desktop.
laravel-elixir-svgstore - create svg sprites
var gulp = require('gulp');
var Elixir = require('laravel-elixir');
var changed = require('gulp-changed');
var svgstore = require('gulp-svgstore');
var Task = Elixir.Task;
Elixir.extend('sprites', function (src, output) {
new Task('sprites', function () {
return gulp.src(src)
.pipe(changed(output))
.pipe(svgstore({inlineSvg: true}))
.pipe(gulp.dest(output))
.pipe(new Elixir.Notification('SVG Sprite Created!'))
})
.watch(src)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment