Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Ember addon to combine SVG files into one JS file and inject it through dedicated component into application. It makes maintenance of SVGs easy and deliver the best possible interaction with SVGs.

License

NotificationsYou must be signed in to change notification settings

vastec/ember-cli-misvg

Repository files navigation

npm versionBuild Statusember-cli version

ember-cli-misvg

Ember addon to combine SVG files into one JS file and inject it through dedicated component into application. It makes maintenance of SVGs easy and deliver the best possible interaction with SVGs.

Installation

ember install ember-cli-misvg

Usage

Configuration

Define where your SVG icons are inpublic directory (sourceDirs param) and where the outputshould be placed (outputFile param). Like this:

// ember-cli-build.jsletapp=newEmberApp(defaults,{misvg:{files:{sourceDirs:'public/img/svg-icon',outputFile:'/assets/svg-sprites.js'},misvgOptions:{indent:2}}});

Optionally you can also passmisvg configuration options viamisvgOptions property.

Adding to project

Add generated script file that contains sprites to your project:

// index.html<scriptsrc="{{rootURL}}assets/svg-sprites.js"></script>

Usage via component

Usemisvg-icon component with thename of SVG icon (in align with the filename). You can also scale it viawidthandheight params.

{{misvg-iconname="star"width=20height=20}}

Contributing

Installation

  • git clone https://github.com/vastec/misvg.git
  • cd ember-cli-misvg
  • npm install

Linting

  • npm run lint:js
  • npm run lint:js -- --fix

Running tests

  • ember test – Runs the test suite on the current Ember version
  • ember test --server – Runs the test suite in "watch mode"
  • ember try:each – Runs the test suite against multiple Ember versions

Running the dummy application

For more information on using ember-cli, visithttps://ember-cli.com/.

License

This project is licensed under theMIT License.

About

Ember addon to combine SVG files into one JS file and inject it through dedicated component into application. It makes maintenance of SVGs easy and deliver the best possible interaction with SVGs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp