1.1.8 • Published 5 months ago
@s4e/icons v1.1.8
S4E Icon Library
S4E Icon Library is a customizable React icon library. Below are the steps to add, update, and publish icons in this library. https://www.npmjs.com/package/@s4e/icons
How to Use
1. Add a New SVG Icon
- Place the new SVG file inside the 
src/iconsfolder. 
2. Generate React Components
Run the following command to generate React components from the SVG files:
npm run generate-iconsIf a component already exists for the given SVG, it will be skipped.
3. Update Exports
Ensure that all generated components are exported in
src/index.tsby running:npm run generate-exportsExisting exports will not be duplicated.
4. Build the Project
Compile the TypeScript files into JavaScript by running:
npm run build
5. Update Version and Publish
Increment the version number and publish the package:
npm version patch npm publish
Project Structure
src/
├── components/
│   ├── IconName/
│   │   └── index.tsx
├── icons/
│   ├── icon-name.svg
├── index.tsScripts Overview
npm run generate-icons: Converts all SVG files insrc/iconsinto React components.npm run generate-exports: Ensures all components are exported insrc/index.ts.npm run build: Compiles TypeScript files to JavaScript.npm version patch: Updates the package version (patch level).npm publish: Publishes the package to NPM.
Additional Notes
- Ensure 
src/iconscontains only valid SVG files.