Have ideas to improve npm?Join in the discussion! »

    ember-cli-google-fonts

    2.16.2 • Public • Published

    Ember-cli-google-fonts

    Lazily add Google Fonts to your Ember application.

    This addon will add the fonts declaration to the content-for: head hook to avoid including these inside the css files.

    Addon dummy build is available here: http://damiencaselli.github.io/ember-cli-google-fonts/.

    Versions follow Ember 2.x project versioning.

    Installation

    Install addon

    ember install ember-cli-google-fonts

    Declare fonts

    // config/environment.js
     
    module.exports = function(environment) {
      var ENV = {
        /* your config */
     
        googleFonts: [
          'Open+Sans:300,400,700',
          'Roboto:300'
        ],
     
        // Set or update content security policies
        contentSecurityPolicy: {
          'font-src': "'self' fonts.gstatic.com",
          'style-src': "'self' fonts.googleapis.com"
        }
      }
     
      return ENV;
    }

    Install

    npm i ember-cli-google-fonts

    DownloadsWeekly Downloads

    3,452

    Version

    2.16.2

    License

    MIT

    Last publish

    Collaborators

    • avatar