0.4.2 • Published 2 months ago

dl-iconfont v0.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

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

1stGRxTSUnTS
1stG Open Collective backers and sponsorsRxTS Open Collective backers and sponsorsUnTS Open Collective backers and sponsors

Backers

Backers

1stGRxTSUnTS
1stG Open Collective backers and sponsorsRxTS Open Collective backers and sponsorsUnTS Open Collective backers and sponsors

Changelog

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

License

MIT © Edisonsu768

0.4.2

2 months ago

0.4.1

5 months ago

0.4.0

5 months ago

0.3.0

2 years ago

0.2.0

2 years ago

0.3.1

2 years ago

0.1.1

3 years ago

0.1.0

3 years ago