Skip to content

An iconfont downloader via puppeteer.

License

Notifications You must be signed in to change notification settings

un-ts/dl-iconfont

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2cef9f6 · Sep 13, 2021

History

21 Commits
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Jul 1, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021
Sep 13, 2021

Repository files navigation

dl-iconfont

GitHub Actions Codacy Grade type-coverage npm GitHub Release

David Peer David David Dev

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_ID (required)
  2. ICONFONT_LOGIN (required)
  3. ICONFONT_PASSWORD (required)
  4. ICONFONT_DOWNLOAD_FILE (optional)
  5. PUPPETEER_HEADLESS (optional)

Command

# [iconfont.js] is optional, it can be provided via env `ICONFONT_DOWNLOAD_FILE` too
dli iconfont.js

API

import { fetchJsUrl, download } from 'dl-iconfont'

const jsUrl = await fetchJsUrl({ projectId, login, password, headless })
await download(jsUrl, 'iconfont.js')

Changelog

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

License

MIT