GithubHelp home page GithubHelp logo

isabella232 / ember-cli-webfont Goto Github PK

View Code? Open in Web Editor NEW

This project forked from freshworks/ember-cli-webfont

0.0 0.0 0.0 25 KB

Easily generate webfonts from svg files as part of your ember-cli build process

License: MIT License

JavaScript 76.34% HTML 23.66%

ember-cli-webfont's Introduction

ember-cli-webfont

This addon wraps broccoli-webfont to allow you to easily generate webfonts as part of your ember build process.

Installation

ember install ember-cli-webfont

Usage

By default the addon expects to find your SVG files in app/webfont-svg and will add CSS classes to your generated CSS.

To use the icons you just need to give an element these classes e.g.

<span class="iconfont iconfont-ember"></span>

Will display the SVG from app/webfont-svg/ember.svg (with the default values for path, classPrefix and baseClass - see below).

Configuration

You can configure the behaviour of the addon by passing a hash of options when initialising your ember app. The names of parameters and default options are shown below:

var app = new EmberApp({
  webfont: {
    path: 'app/webfont-svg/',
    options: {
      files: ['**/*.svg'],
      dest: 'assets/webfonts/',
      fontName: 'iconfont',
      cssFontsPath: 'webfonts/',
      cssTemplate: webfont.templates.css,
      templateOptions: {
        classPrefix: 'iconfont-',
        baseClass: 'iconfont'
      }
    }
  }
});

Documentation on these options can be found on the broccoli-webfont and webfonts-generator repositories.

Developing addon

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/.

ember-cli-webfont's People

Contributors

ehariprasad avatar ember-tomster avatar vitch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.