Giter Site home page Giter Site logo

Comments (7)

HeskeyBaozi avatar HeskeyBaozi commented on July 27, 2024

目前图标和文档中的图标命名是不一致的,现在的图标命名尚不遵循图标命名规范,不建议在生产环境中使用。
已经发布在npm上。

yarn add @ant-design/icons

from ant-design-icons.

fjc0k avatar fjc0k commented on July 27, 2024

@HeskeyBaozi ok,不过我这儿说的是 src/svg 下的图标应该发布去 npm,package.json 的 files 应该加上 src

  "files": [
    "es",
    "lib",
    "README.md",
    "src"
  ],

目前 npm 上无 svg 源文件:https://unpkg.com/@ant-design/icons/

from ant-design-icons.

HeskeyBaozi avatar HeskeyBaozi commented on July 27, 2024

用户直接消费的是libes中的已经结构化的图标数据结构。
发布svg会造成冗余。

from ant-design-icons.

fjc0k avatar fjc0k commented on July 27, 2024

@HeskeyBaozi 特定结构的数据对使用的工具有要求吧。而 svg 源文件,可满足各式需求。

from ant-design-icons.

HeskeyBaozi avatar HeskeyBaozi commented on July 27, 2024

的确。这种需求也是有的。

from ant-design-icons.

HeskeyBaozi avatar HeskeyBaozi commented on July 27, 2024

474f817
https://unpkg.com/@ant-design/icons/

from ant-design-icons.

fjc0k avatar fjc0k commented on July 27, 2024

@HeskeyBaozi ok,还有个建议:发布的 svg 文件名可考虑统一小写,再把空格转为 - 号。如此,可使用 babel-plugin-import 进行按需加载:

  plugins: [
    ['import', {
      libraryName: '@ant-design/icons',
      customName: name => `@ant-design/icons/svg/${name}.svg`
    }, 'ant-design-icons']
  ]

from ant-design-icons.

Related Issues (20)

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.