Giter Club home page Giter Club logo

dl-iconfont's Introduction

dl-iconfont

GitHub Actions Language grade: JavaScript 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

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

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

dl-iconfont's People

Contributors

jounqin avatar github-actions[bot] avatar edisonsu768 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.