dl-iconfont
v0.4.2
Published
An iconfont downloader via puppeteer.
Downloads
9
Readme
dl-iconfont
An iconfont downloader via puppeteer.
TOC
Install
# yarn
yarn global add dl-iconfont
# npm
npm i -g dl-iconfont
Usage
CLI
dotenv is used inside the CLI, so you can simply create a .env
file.
Environments
ICONFONT_PROJECT
(optional, can be provided via-p
option)ICONFONT_LOGIN
(optional, can be provided via-l
option)ICONFONT_PASSWORD
(optional, can be provided via-p
option)ICONFONT_DOWNLOAD_FILE
(optional, can be provided viadownloadFile
argument)PUPPETEER_HEADLESS
(optional, can be provided via-h
option)
Command
dli
, dl-iconfont
and iconfont-dl
are all available.
Usage: dli [options] [downloadFile]
Arguments:
downloadFile Filename path to be downloaded
Options:
-V, --version output the version number
-p, --project <string> Project ID from iconfont.cn
-l, --login <string> User login (mobile number) for iconfont.cn
-p, --password <string> User password for iconfont.cn
-h, --headless <boolean> Run in headless mode (default: true)
--help display help for command
API
import { fetchJsUrl, download } from 'dl-iconfont'
const jsUrl = await fetchJsUrl({ project, login, password, headless })
await download(jsUrl, 'iconfont.js')
Sponsors
| 1stG | RxTS | UnTS | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | | | |
Backers
| 1stG | RxTS | UnTS | | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | | | |
Changelog
Detailed changes for each release are documented in CHANGELOG.md.