Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

iconfont-pull

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iconfont-pull

iconfont图标包下载器

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
3
-80%
Maintainers
1
Weekly downloads
 
Created
Source

iconfont-pull

iconfont图标包下载工具

安装

pnpm i iconfont-pull
# yarn add iconfont-pull
# npm i iconfont-pull

使用

下载字体包

import { download } from 'iconfont-pull'

download({
  pid: '123456',
  token: 'abc123',
  destDir: './fonts',
  cssFileName: 'iconfont-pull.css'
})

参数

  • token(string): iconfont的token,登录iconfont后,打开F12控制台,名为EGG_SESS_ICONFONT的cookie即为该token
  • pid(string): 项目id
  • destDir(string): 下载的文件存放的目录
  • cssFileName(string): 下载的css文件名称

下载SVG包

import { downloadSvgs } from 'iconfont-pull'

downloadSvgs({
  pid: '123456',
  token: 'abc123',
  destDir: './svgs'
})

参数

  • token(string): iconfont登录token
  • pid(string): 项目ID
  • destDir(string): 目标目录
  • filename((iconName: string) => string): svg文件名重写
  • cssFileName(string): 下载的css文件名称

FAQs

Package last updated on 10 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts