mui-svgr-generator v1.0.1
mui-svgr-generator
mui-svgr-generator is a command-line tool to generate MUI-compatible SVG React components using SVGR. This tool helps streamline the process of converting SVG files into Material-UI Icon components.
Installation
You can install mui-svgr-generator globally using npm:
npm install -g mui-svgr-generatorUsage
Command Line
To generate MUI-compatible Icon components from SVG files, you can use the following command:
npx run mui-svgr-generator [options]Options
-V, --version: Output the version number
-i, --inDir <directory>: Input directory for the icons
-o, --outDir <directory>: Output directory for the icons (default: "./icons")
-ts, --typescript <"true" | "false"> : Whether to generate typescript icons (true or false) (default: "true")
-h, --help: Display help for command
Example
mui-svgr-generator --i ./svgs -o ./iconsThis will convert all SVG files in the ./svgs directory into TypeScript React components wrapped with MUI's SvgIcon and save them in the ./icons directory.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License.