# Esvg Easly slip optimized, cached svgs into your workflow using standalone CLI or the simple Rails integration. 1. Converts a directory full of SVGs into a an optimized SVG using symbols for each file. 2. Build a Javascript file to inject SVGs into pages, so it's easily cacheable. 3. Offers Rails application helpers for placing icons in your views. [![Gem Version](http://img.shields.io/gem/v/esvg.svg)](https://rubygems.org/gems/esvg) [![Build Status](http://img.shields.io/travis/imathis/esvg.svg)](https://travis-ci.org/imathis/esvg) [![License](http://img.shields.io/:license-mit-blue.svg)](http://imathis.mit-license.org) ## Installation Add this line to your application's Gemfile: ```ruby gem 'esvg' ``` And then execute: $ bundle Or install it yourself as: $ gem install esvg ## Usage: Rails Add `Esvg.precompile_assets` to your `config/initializers/assets.rb` to add build with `rake assets:precomile`. Add SVG files to your `app/assets/svgs/` directory. for example: ``` app/assets/svgs - logo.svg - share.svg - thumbs-up.svg ``` ### Inject SVG symbols Add this to a page or layout where SVGs should be available ``` <%= embed_svgs %> ``` **During development:** This will embed a `