@zhiaiwan/icons-compiler
v1.0.1
Published
Zhiaiwan icons compiler
Readme
@zhiaiwan/icons-compiler
@zhiaiwan/icons-compiler 用于把 SVG 图标资产编译为 react/vue/vue3/svg 四端源码产物。
安装
npm i @zhiaiwan/icons-compiler快速使用
import { forgeIconArtifacts } from '@zhiaiwan/icons-compiler'
const files = forgeIconArtifacts({
target: 'react',
preset: {
signature: 'Zhiaiwan Icons',
classPrefix: 'i',
baseStroke: 4,
lineJoin: 'round',
lineCap: 'round',
},
assets: [
{
symbol: 'abnormal',
title: '异常',
svg: '<svg ...>...</svg>',
mirrorRtl: true,
},
],
})输入与输出
- 输入:
target、preset、assets - 输出:
OutputArtifact[]
type OutputArtifact = {
path: string
content: string
mime?: string
}目标平台
reactvuevue3svg
License
MIT
