Skip to content

Latest commit

 

History

History
108 lines (76 loc) · 5.62 KB

README.md

File metadata and controls

108 lines (76 loc) · 5.62 KB

dl-iconfont

GitHub Actions type-coverage npm GitHub Release

Conventional Commits Renovate enabled JavaScript Style Guide Code Style: Prettier changesets

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

  1. ICONFONT_PROJECT (optional, can be provided via -p option)
  2. ICONFONT_LOGIN (optional, can be provided via -l option)
  3. ICONFONT_PASSWORD (optional, can be provided via -p option)
  4. ICONFONT_DOWNLOAD_FILE (optional, can be provided via downloadFile argument)
  5. 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
1stG Open Collective backers and sponsors RxTS Open Collective backers and sponsors UnTS Open Collective backers and sponsors

Backers

Backers

1stG RxTS UnTS
1stG Open Collective backers and sponsors RxTS Open Collective backers and sponsors UnTS Open Collective backers and sponsors

Changelog

Detailed changes for each release are documented in CHANGELOG.md.

License

MIT © Edisonsu768