Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solidzoro/react-icons-builder
build custom react-icons svg icons collection.
https://github.com/solidzoro/react-icons-builder
builder gen generator icons react-icons react-icons-builder
Last synced: 19 days ago
JSON representation
build custom react-icons svg icons collection.
- Host: GitHub
- URL: https://github.com/solidzoro/react-icons-builder
- Owner: SolidZORO
- License: mit
- Created: 2021-09-22T11:50:37.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-22T15:17:00.000Z (about 3 years ago)
- Last Synced: 2024-10-24T11:53:27.285Z (25 days ago)
- Topics: builder, gen, generator, icons, react-icons, react-icons-builder
- Language: JavaScript
- Homepage:
- Size: 31.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# react-icons-builder
build custom `react-icons` svg icons collection.
## Installation
```sh
yarn add -D react-icons-builder
```## Usage
1. copy `*.svg` files to `src/icons` (example path)
2. create a index.js to `src/icons`
```javascript
const path = require('path');module.exports = {
icons: [
{
id: 'li',
name: 'LocalIcon',
contents: [
{
files: path.resolve(__dirname, './*.svg'),
formatter: (name) => `Li${name}`,
},
],
license: 'MIT',
projectUrl: 'https://li.local',
licenseUrl: 'https://li.local',
},
],
};
```3. add a script to project package.json `scripts`:
```
"scripts": {
"build-icons": "react-icons-builder --src ./src/icons --dist ./src/libs/react-icons-ext",
},
```4. yarn build-icons
5. use for code:
```tsx
import { RiAbc } from 'react-icons/ri';
import { LiXzy } from '@/libs/react-icons-ext/li'; // `@` aliase src direxport default () => {
return (
);
};
```## License
© [MIT](./LICENSE)