Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

create-iconfont-component

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-iconfont-component

create-iconfont-component

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
189
Maintainers
1
Weekly downloads
 
Created
Source

create-iconfont-component

本项目是根据 Iconfont 上的图标在项目中生成 React 或者 Vue 组件,方便大家使用。

使用方式一(推荐):

  1. 在项目根目录新增 iconfont.json 文件
[
  {
    // 项目名称
    "projectName": "project", 
    // iconfont 项目id 
    "iconfontId": 000, 
    // 项目使用框架 react | vue
    "projectType": "react",
    // 组件生成位置 相对位置
    "componentPath": "./dist",
    // 项目使用的 语言 Typescript | JavaScript
    "projectLanguage": "Typescript",
    // 是否给 svg 添加 class
    "svgClass": "demo"
  }
]
  1. 安装 create-iconfont-component
npm install -D create-iconfont-component
  1. 在项目 package.json 中新增
 "scripts": {
    ...
    "iconfont": "create-iconfont-component"
  },

使用方式二:

  1. 执行以下命令
npx create-iconfont-component
  1. 按照提示填写信息
✔ 请输入项目名称 projecta
✔ 请输入Iconfont项目Id 0
✔ 请选择项目应用框架 React
✔ 项目开发语言 Typescript
✔ 请输入组件生成位置 ./dist
✔ 请输入svg className前缀
✔ 是否生成预览文件 是

Keywords

FAQs

Package last updated on 18 Dec 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc