1.1.3 • Published 1 year ago

get-vue-svg v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Convert Svgs to Vue Components

#Input                 #Output

svgs                   src/components/svgs
|home.svg              |HomeSvg.vue
|logo.svg              |LogoSvg.vue
|social                |social
    |-instagram.svg         |-InstagramSvg.vue
    |-twitter.svg           |-TwitterSvg.vue
    |dark                   |dark
       |-instagram.svg        |-InstagramSvg.vue

Usage

npm -D install get-vue-svg

You can create a command in your package.json

"scripts": {
  "svg": "get-vue-svg <your-svg-folder-path>"
},

# npm run svg

or launch the following command if you installed it globally.

get-vue-svg <your-svg-folder-path>

The command above will create your components, then you can use the component after you imported it.

<VueSvg width="40px" fill="blue" stroke="white" strokewidth="1" />

Props

The default values of the following props are their original values, but if the SVG does not have the following properties, the following values will be the default of the SVG props.

propsdefault
width24
height100%
fillnone
strokenone
strokewidth1
opacity1

License

MIT

1.1.1

1 year ago

1.1.0

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.0

2 years ago