Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 834 Bytes

README.md

File metadata and controls

42 lines (26 loc) · 834 Bytes

svg-vue-cli

Use to convert svg files in the current directory to vue components or react components, and create a folder to place the converted vue files, providing the entry file (example index.ts).

Installation

Install with npm

npm install svg-vue-cli -g

Usage

# Go to the directory containing the svg file
cd ./svgfolder
# execution instruction(Vue component)
svg-vue
# execution instruction(React component)
svg-react

command line parameter

  • --dirname

    • Used to change the name of the generation directory, the default is icons.

      example: svg-vue --dirname=svgfolder

  • --type

    • Change the file suffix js or ts. The default is ts

      example:svg-vue --type=js

  • --version

    • Viewing the Version Number

      example:svg-vue --version