npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pull-iconfont-cli

v0.1.2

Published

从 iconfont 拉取项目图标文件到本地

Downloads

6

Readme

pull-iconfont-cli

从 iconfont 拉取项目图标文件到本地

安装

npm i pull-iconfont-cli -D

cli方式使用

使用cdn链接拉取到本地目录

npx pull-iconfont-cli download https://at.alicdn.com/t/font_313726_0uhevtktz4ld.css -f iconfont.css -d ./src/common/css/UI/font

使用账号和密码拉取某个项目的最新的文件到本地

# 命令格式
pull-iconfont-cli pull <pid> <username> <password> -d [文件下载到的目标路径] -f [文件名]
# 示例
npx pull-iconfont-cli pull 313626 13128732587 yourpassword -f iconfont.css -d ./src/common/css/UI/font

命令及参数说明

pull 命令

参数说明

npx pull-iconfont-cli pull <pid> <username> <password> -d [文件下载到的目标路径] -f [文件名]

如何获取 参数pid 即项目id

示例图片

示例

# 不指定输出目录和文件名
npx pull-iconfont-cli pull 313626 13128732587 yourpassword
# 指定输出目录和文件名
npx pull-iconfont-cli pull 313626 13128732587 yourpassword -f iconfont.css -d ./src/common/css/UI/font

download 命令

参数说明

npx pull-iconfont-cli download <font class cdn链接> -d [文件下载到的目标路径] -f [文件名]

如何获取 font class cdn链接

示例图片

示例

npx pull-iconfont-cli download https://at.alicdn.com/t/font_313726_0uhevtktz4ld.css -f iconfont.css -d ./src/common/css/UI/font

包方式使用

const downloadIconfont = require('pull-iconfont-cli')
let downloadUrl = 'https://at.alicdn.com/t/font_313726_0uhevtktz4ld.css'
let fileName = 'iconfont.css'
downloadIconfont({
    url: downloadUrl,
    fileName: fileName,
    dest: './css/icon/fonts'
})

下载后文件目录结构

├── font
│   ├── iconfont.css
│   ├── iconfont.eot
│   └── iconfont.woff

选项说明

| 选项名 | 解释 | 是否必选 | 默认值 | | ---- | ---- | ---- | ---- | | url | iconfont中提供的项目在线链接,注意是 font class中的.css结尾的链接哦 | 必选 | 无 | | fileName | 下载后文件名 | 可选 | iconfont.css | | dest | 下载后输出目录 | 可选 | 当前目录下/font文件夹 |