1.1.8 • Published 8 months ago

@s4e/icons v1.1.8

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

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

  1. Place the new SVG file inside the src/icons folder.

2. Generate React Components

  1. Run the following command to generate React components from the SVG files:

    npm run generate-icons
  2. If a component already exists for the given SVG, it will be skipped.

3. Update Exports

  1. Ensure that all generated components are exported in src/index.ts by running:

    npm run generate-exports
  2. Existing exports will not be duplicated.

4. Build the Project

  1. Compile the TypeScript files into JavaScript by running:

    npm run build

5. Update Version and Publish

  1. 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.ts

Scripts Overview

  • npm run generate-icons: Converts all SVG files in src/icons into React components.
  • npm run generate-exports: Ensures all components are exported in src/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/icons contains only valid SVG files.
1.1.8

8 months ago

1.1.7

8 months ago

1.1.6

10 months ago

1.1.5

10 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago