Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dervexdev/svg-to-tsx
Convert all your SVGs to a single TSX module
https://github.com/dervexdev/svg-to-tsx
cli icons jsx react svg tsx
Last synced: about 1 month ago
JSON representation
Convert all your SVGs to a single TSX module
- Host: GitHub
- URL: https://github.com/dervexdev/svg-to-tsx
- Owner: DervexDev
- License: apache-2.0
- Created: 2023-12-03T22:32:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-04T13:15:58.000Z (about 1 year ago)
- Last Synced: 2024-11-10T08:49:05.897Z (about 2 months ago)
- Topics: cli, icons, jsx, react, svg, tsx
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/svg-to-tsx
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# svg-to-tsx
Convert all your SVGs to a single TSX module
## Usage
1. Run `npm i svg-to-tsx`
2. Add following script to your `package.json````json
"icons": "svg-to-tsx -i ./input/path -o ./output/path -n fileName"
```3. Run `npm run icons`
## CLI Options
| Short | Long | Description | Default |
| ----- | -------- | ----------------------------------- | ------- |
| -i | --input | Path to where SVG files are located | none |
| -o | --output | Output module destination path | none |
| -n | --name | Output module file name | "icons" |## Warning
This package was made in a hurry because I needed it for my website. I will improve it somewhere in the future with additional settings.