A Broccoli tree that concatenates all SVG files in a tree into a hash exported on window.
This way you can include SVG graphics directly in your code and render it to the DOM without extra network requests.
npm install --save broccoli-svg-concatenator
var tree = ;
var concatSvg = ;var svg =;
Will find all
.svg files inside
public/assets/images and save a file to
assets/svg.js like this:
windowMySvg ='icons/house': '...svg...''shapes/circle': '...svg...';
outputFilerequired: The file to write the SVG contents to.
name: The name of the variable exposed on
windowcontaining all the SVG contents. Defaults to