ember-fontsource

1.0.0 • Public • Published

Ember Fontsource

Build Status npm version Monthly Downloads Ember Observer Score

Easily add fontsources to your Ember project in 2 easy steps.




Background

This Ember addon is adapted from [https://github.com/jeffjewiss/ember-typeface]

Installation

ember install ember-fontsource

Usage

  1. Install Ember Typeface: ember install ember-fontsource
  2. Pick a fontsource from the list of over 800 available and add it to your project: npm install fontsource-lato --save-dev

That’s it!

You are now free to use font-family: "Lato" in your application’s styles.

Advanced Usage

Ember Typeface will try to look through your node_modules to discover fontsource packages. If fontsources are specified in the config options in your app’s evironment: ENV.fontsourceOptions.fontsources the two lists will be merged for unique values. However, you can choose to disable this auto discovery and configure which fontsources are imported into your project.

// config/environment.js
module.exports = function(environment) {
  let ENV = {
    ...
 
    fontsourceOptions: {
      disableAuto: true, // default is false, disable to manually choose fontsources
      fontsources: [
        'lato'
      ]
    }
  };
};

Commands

  • ember fontsource:active – view a list of the fontsources to be included in the app
  • ember fontsource:list – view a list of all the available fontsources
  • ember fontsource:search <name> – perform a fuzzy search on the list of fontsources

Package Sidebar

Install

npm i ember-fontsource

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

25 kB

Total Files

6

Last publish

Collaborators

  • mwhitworth