1.2.0 • Published 5 years ago

webfonts-icon v1.2.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

Explain

Icon font generator, Can use icons to fit into the project.

Install

npm i webfonts-icon -D

Usage

Commander

Using the command line to generate font icons

webfonts-icon -f[--files] -d[--dest] -c[--config] -e[--ext]

Npm scripts

Using package.json:

{
  "scripts": {
    ...,
    "fonticon": "webfonts-icon -f ./svg/**/*.svg -d ./fonts -e .scss"
  }
}
paramtypeexplain
filesstringIcons catalog name, example: ./svg/*/.svg
deststringDirectory name of output
configobjectdefault: webfonts.config.js, return "object"
extstringStyle file ext\'name

API

The way used in script files, Return Promise class. Specific reference to the following script examples:

const webfontsIcon = reqiure('webfonts-icon')

webfontsIcon(options).then(data => {})

or:

const compile = async options => { await webfontsIcon(options) }

Config reference

config item: Extended:

paramtypeexplain
filesstring/pattern/arrayglob type path value, default: ./svg/*/.svg
deststringDirectory name of output, default: ./fonts
startCodepointnumberdefault: 0xe600
extNamestringStyle file ext's name, default: .css
tipsboolenTips output success message. default: false

@vusion/webfonts-generator

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago