create fomantic icons

字体下载 2025-07-31

Fomantic-UI图标CLI工具

生成icon.variablesicon.html.eco文件的Fomantic-UI 2.9.0+

如果您需要此工具fui <= 2.8.8或sui,请使用1.1.0版本

您可以使用此脚本为Fontawesome的免费和Pro版本生成图标。

要求

  • nodejs> = 18.18.0
  • NPM
  • 或纱

用法

NPM

$ npx create-fomantic-icons 

$ yarn create fomantic-icons

下载后,您将提示一些问题,这将使您能够生成所需的特定图标集。

选择您想要哪个fontawesome图标集

 Which icons set would you like to generate?
  > FontAwesome 5 Free
    FontAwesome 6+ Free  
    FontAwesome Pro

注意:您需要一个许可才能从Fontawesome Pro生成图标

接下来选择您要使用的版本

 Which version of FontAwesome 5 Free should we download?
  > 5.8.1
    5.8.0
    5.7.2
    5.7.1
    5.7.0

现在您需要指定在哪里保存图标

 Where would you like the dist saved? [C:UsersUsernameDocumentsfui-icons]

注意:默认位置为{pwd}/fui-icons 。当您指定自己的位置时,它是当前PWD的相对。例如,如果我输入new-icons我的图标将被放置在C:UsersUsernameDocumentsnew-icons中。

一旦回答了所有提示,您选择的图标集将从Github下载,并将被解析。下载并解析后,它将为您指定的位置中的A FUI(或SUI)主题和文档页面构建所需的文件。

 i asset doesn't exist locally, starting download
√ downloaded (fontawesome-free-5.8.1-web.zip)
√ asset saved (C:UsersUsernameAppDataLocalTempfui-icon-scriptfontawesome-free-5.8.1-web.zip)
√ asset extracted (C:UsersUsernameAppDataLocalTempfui-icon-scriptfontawesome-free-5.8.1-web)
√ icons & categories parsed

  Results:
    Solid:   936
    Outline: 151
    Thin:    0
    Brand:   426
             1513

√ build all dist files
  Files saved to C:UsersUsernameDocumentsnew-icons

注意:如果脚本检测到您已经下载了图标集,它将跳过下载并使用本地文件。

删除下载的文件

如果要删除下载的文件,它真的很简单。

NPM

$ npx create-fomantic-icons --clean 

$ yarn create fomantic-icons --clean
下载源码

通过命令行克隆项目:

git clone https://github.com/fomantic/create-fomantic-icons.git