New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dtwo-webfontloader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtwo-webfontloader

Efficient web font loading has never been easier!

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Dtwo Webfontloader

Features

  • Full support of SVGs as components. Import them like your Kdu SFCs
  • Built on top of Google's/Typekit's webfontloader
  • Improves site performance by loading web-fonts asynchronously
  • Dtwo 2 (and only Dtwo 2) support
  • Fully tested!

Setup

  • Add dtwo-webfontloader as a dependency using yarn or npm to your project
  • Add dtwo-webfontloader to modules section of dtwo.config.js
{
  modules: [
    'dtwo-webfontloader',
  ],
}
  • Include your webfontloader options in the dtwo.config.js, for example:
export default {
  webfontloader: {
    google: {
      families: ['Lato:400,700'] //Loads Lato font with weights 400 and 700
    }
  },
}

  • Remove old stylesheets from your app template or dtwo.config.js head part:
export default {
  head:{
    link: [
      // You don't need that line anymore!
      { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Lato:400,700' }
    ]
  }
}

Development

  • Clone this repository
  • Install dependencies using yarn install or npm install
  • Start development server using npm run dev

License

MIT License

Copyright (c) NKDuy

Keywords

dtwojs

FAQs

Package last updated on 12 Sep 2023

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