svg-sprite-injector
v1.0.0
Published
Async load svg-sprites
Downloads
180
Readme
svg-sprite-injector
Async load svg-sprites
Inspired by http://osvaldas.info/caching-svg-sprite-in-localstorage
Usage
Just simply call
svgSpriteInjector('sprite.svg');
Cache by localStorage
svgSpriteInjector('sprite.svg', {
revision: 1 // Revision identifier
});
Params in DOM
svgSpriteInjector(document.body);
<body data-svg-sprite="sprite.svg" data-svg-sprite-revision="1">
<div></div>
</body>
Combine separated SVG's
For combine svg files into one with elements use gulp-svgstore or grunt-svgstore
License
Copyright © 2015 Bogdan Chadkin