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

ember-svg-jar

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-svg-jar

Comprehensive SVG support for Ember applications

  • 0.8.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9K
decreased by-67.07%
Maintainers
1
Weekly downloads
 
Created
Source

Standard
Ember SVGJar

Build Status NPM Version NPM Downloads Ember Observer Score

The best way to bring SVG goodness to your Ember application

What’s in the Box?

  • “install it and forget it” mode (no configuration needed)
  • automatic SVG optimization (it can cut file size by half or more)
  • a kick ass viewer to find and use your assets the fastest way possible
  • a handy helper {{svg-jar "asset-name"}}
  • support for both inline and symbol embedding methods

Installation

$ ember install ember-svg-jar

Try it in 4 easy steps

  • Put some SVG files to any place in your public directory.
  • Run the development server and open this link with Chrome: http://localhost:4200/ember-svg-jar/index.html
  • Select any SVG there and click Enter to copy it to the clipboard.
  • Paste it into a template and see it rendered in your browser.

Usage

Just drag and drop SVG images to your source directory and copy & paste them from the assets viewer to your templates.

The viewer is available at: http://localhost:4200/ember-svg-jar/index.html

Helper

Use the svg-jar helper to embed SVG images to your application's templates:

{{svg-jar "my-cool-icon" class="icon" width="24px"}}

The helper takes an asset ID and optional attributes that will be added to the created SVG element. The example above will create an SVG like this:

<svg class="icon" width="24px">...</svg>

Compatibility

The addon is compatible with Ember 1.10.1 and beyond.

Configuration

Note: In most of cases, Ember SVGJar should be useful without any configuration. But it wants to be very configurable when it's time to adjust it for your needs.

Development setup

Installation

  • git clone git@github.com:ivanvotti/ember-svg-jar.git
  • npm install
  • bower install

Building

  • npm run build

Linting

  • npm run lint (it checks src addon app tests directories)

Running tests

  • npm test (it runs npm run lint && ember test)
  • ember test
  • ember test --server
  • ember try:each

Running the dummy app

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

Assets viewer

The viewer is a separate Ember application, which repository can be found at this link.

License

This project is distributed under the MIT license.


GitHub @ivanvotti  ·  Twitter @ivanvotti

Keywords

FAQs

Package last updated on 01 Aug 2016

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