Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-inline-svg

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-inline-svg

Ember CLI addon to render SVG images inline

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.9K
increased by135.43%
Maintainers
1
Weekly downloads
 
Created
Source

ember-inline-svg

Displays SVG images inline.

Usage

{{inline-svg "path/to/file"}}

This will display the SVG found at /public/images/path/to/file.svg (see below on how to change this).

You can specify a class for the element like so:

{{inline-svg "my-svg" class="foo"}}

Configuring

SVG Paths

By default the addon expects to find your SVG images at /public/images/, but you can change this by setting the svg.paths option in your application's Brocfile.js

var app = new EmberApp({
  svg: {
    paths: [
      'public/images',
      'app/svgs'
    ]
  }
});

Optimizing

SVGs are optimized by svgo by default.

You can configure this by setting the svg.optimize options:

var app = new EmberApp({
  svg: {
    optimize: {
      plugins: [
        { removeDoctype: false },
        { removeTitle: true },
        { removeDesc: true }
      ]
    }
  }
});

Alternatively, you can disable it completely by setting this to false:

var app = new EmberApp({
  svg: {
    optimize: false
  }
});

Developing

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit http://www.ember-cli.com/.

Keywords

FAQs

Package last updated on 05 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc