Skip to content

Instantly share code, notes, and snippets.

@davidhund
Created September 16, 2015 09:49
Show Gist options
  • Save davidhund/49aa269fd535ce138728 to your computer and use it in GitHub Desktop.
Save davidhund/49aa269fd535ce138728 to your computer and use it in GitHub Desktop.
svg-sprite meta-data injection issue
// svg-sprite config
var spriteConfig = {
dest: 'static/svg/min/',
log: 'verbose',
mode: {
symbol: {
dest: './',
prefix: 'svg-%s',
sprite: 'spritemap.svg',
shape: {
meta: 'svg-sprite.shapes.yml'
}
}
}
};

My svg-sprite generation works, but…

While I generate svg sprites fine (gulp-svg-sprite) my meta-data is not picked up.

It's probably a path/name issue, but I see no errors.

Folder Structure

|- ..
|- gulpfile.js
|- gulp/
  `-- tasks/
    |- svg-sprite.js
    |- svg-sprite.yml
|- static/
  `-- svg/
    |- icon-*.svg
      `-- min/
        |- spritemap.svg
"/static/svg/icon-X.svg" :
title : title X
description : description X
"/static/svg/icon-Y.svg" :
title : title Y
description : description Y
"/static/svg/icon-Z.svg" :
title : title Z
description : description Z
@davidhund
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment