Skip to content

partageit/padcef

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Padcef

PostCSS plugin to parse and download CSS external fonts

The aim of this plugin is to avoid cache, compression and other problems of fonts provided by external servers.

Installation

$ npm install padcef

Usage

// dependencies
var fs = require("fs")
var postcss = require("postcss")
var padcef = require("padcef")

// css to be processed
var css = fs.readFileSync("input.css", "utf8")

// process css
var output = postcss()
  .use(padcef({
    dest: "my-fonts-folder"  // where external fonts are downloaded
  }))
  .process(css)
  .css

Options

dest (default: "external-fonts")

Download fonts in this folder.

Todo

  • new option: exclude
  • new option: clean-dest
  • new option: do not overwrite existing font files
  • better tests (error handling test is missing)

About

PostCSS plugin to parse and download CSS external fonts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages