Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@empathyco/x-svg-converter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Convert SVGs into Vue components to use with the X Design System
This project generates Vue components from SVGs in a folder, with the format required for the XDS
How to use it
Params
It receives two parameters, the first one should be the path to the folder containing the SVGs. The
second one indicates if the source SVG files should persist at the end of the process
(--keep-svgs). By default, the SVGs are deleted.
- sourcePath: path of the folder with the SVGs.
- keepSVGs: indicates if the SVGs are preserved at the end.
falseby default.
Run it as script
Run the following command to generate a Vue component from each SVG in the source folder:
ts-node ./src/svg-to-vue.ts ./yourSourceFolderIf you want to keep the source SVGs, add the --keep-svgs param:
ts-node ./src/svg-to-vue.ts ./yourSourceFolder --keep-svgs