@fuyoo/svg2vue
v0.1.5
Published
a command line tool to transform svg file to vue component, support vue2/3.
Downloads
2
Readme
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 defaultproject/src/asserts/svg
out
components path defaultproject/src/components/SvgIcon
lang
ts syntax support such as<script lang="ts">
defaultts
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
}