JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q32809F
  • License ISC

Import font icon library file

Package Exports

  • import-icon
  • import-icon/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (import-icon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

import icon

引入svg图标所需要的js和css文件

English document

安装

npm安装:

npm install import-icon

使用

在项目根目录新建一个配置文件icon.config.json

{
  "baseUrl": "https://icon.tiansc.top/api/fonts/",
  "localPath": "public/",
  "cssIcons": [],
  "jsIcons": ["dibicon"],
  "htmlPath": "index.html"
}

配置package.json,新增命令

{
  "scripts": {
    "icon": "import-icon"
  }
}

执行npm命令

npm run icon