Guest User

Untitled

a guest
Nov 19th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. // $ comes from using gulp-load-plugins.
  2. gulp.task('assets:sprites', function () {
  3. return gulp.src(`${paths.source.images}/icon/**/*.svg`)
  4. .pipe($.changed('./'))
  5. .pipe($.svgSprite({
  6. shape: {
  7. spacing: {
  8. padding: 2
  9. }
  10. },
  11. svg: {
  12. precision: 1
  13. },
  14. mode: {
  15. css: {
  16. example: true,
  17. prefix: ".icon__%s",
  18. dimensions: true,
  19. render: {
  20. scss: true
  21. },
  22. sprite: `./../../img/icons`
  23. }
  24. }
  25. }))
  26. .pipe($.imagemin())
  27. .pipe(gulp.dest(`${paths.public.sprites}`));
  28. });
Add Comment
Please, Sign In to add comment