An iconfont downloader via puppeteer.
# yarn
yarn global add dl-iconfont
# npm
npm i -g dl-iconfont
dotenv is used inside the CLI, so you can simply create a .env
file.
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)
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
import { fetchJsUrl, download } from 'dl-iconfont'
const jsUrl = await fetchJsUrl({ project, login, password, headless })
await download(jsUrl, 'iconfont.js')
1stG | RxTS | UnTS |
---|---|---|
1stG | RxTS | UnTS |
---|---|---|
Detailed changes for each release are documented in CHANGELOG.md.