Code Monkey home page Code Monkey logo

Comments (6)

rookiewxy avatar rookiewxy commented on September 15, 2024

这个地址我下载本地运行 https://stackblitz.com/edit/react-ts-icons?file=icons%2Findex.ts

from easy-icons.

rookiewxy avatar rookiewxy commented on September 15, 2024

我刚刚换了一个版本可以运行这个命令yarn ei gen all --svg src/svg --output src/icons,但是没有生成icons文件夹,并报错,提示没有找到\icons\asn

from easy-icons.

ltaoo avatar ltaoo commented on September 15, 2024

hi,非常抱歉我在 1.0.0 版本把命令行去掉了,建议使用 1.0.0 版本暴露的方法来生成 icons,更加简单。

const path = require("path");

const { reactIconsGeneratorFromSVGDir } = require("easy-icons");

const SVG_DIR = path.resolve(__dirname, "../public/svg");
const ICON_OUTPUT_DIR = path.resolve(__dirname, "../src/icons");

reactIconsGeneratorFromSVGDir({
  // SVG 文件夹
  entry: SVG_DIR,
  // icons 文件夹路径
  output: ICON_OUTPUT_DIR,
  // 是否生成 ts 文件,false 时生成 js 文件
  typescript: true,
});

https://github.com/ltaoo/easy-icons-example/tree/master 示例项目也更新了,可以再试试看。 😂

from easy-icons.

rookiewxy avatar rookiewxy commented on September 15, 2024

好的,谢谢,我现在使用的是1.0.0但是asn文件夹下没有内容是空的,没有报错

from easy-icons.

rookiewxy avatar rookiewxy commented on September 15, 2024

from easy-icons.

ltaoo avatar ltaoo commented on September 15, 2024

resolved at v1.1.3

from easy-icons.

Related Issues (3)

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.