@fuyoo/svg2vue
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

svg2vue

a command line tool to transform svg file to vue component, support vue2/3.

features

  • vue2/3
  • configure

use

  • install pnpm i @fuyoo/svg2vue -D
  • create a config file .svg2vue.json at the project root path
  • add script in package.json "svg2vue":"svg2vue"
  • npm run svg2vue

config

  • in svg file path default project/src/asserts/svg
  • out components path default project/src/components/SvgIcon
  • lang ts syntax support such as <script lang="ts"> default ts
  • overwirte if the component has been exists, is the tools should to do overwrite action. default false
{
  "in": "svg",
  "out": "dev",
  "lang": "ts",
  "overwrite": false
}

Readme

Keywords

Package Sidebar

Install

npm i @fuyoo/svg2vue

Weekly Downloads

1

Version

0.1.5

License

MIT

Unpacked Size

31.2 kB

Total Files

9

Last publish

Collaborators

  • fuyoo