Skip to content

Latest commit

 

History

History
162 lines (109 loc) · 4.33 KB

CONTRIBUTING.md

File metadata and controls

162 lines (109 loc) · 4.33 KB

Thank you for your interest in contributing to the @geneui/icons library! We appreciate your efforts to help improve and expand this open-source project. This guide will help you get started with setting up your development environment, adding or removing icons, and submitting your contributions.

Table of Contents

👋 Getting started

Prerequisites

Before you begin, ensure you have the following installed on your machine:

  • Node.js (v14.x or later)
  • npm (v6.x or later) or yarn (optional)
  • Git

Clone the Repository

Clone the @geneui/icons repository repository to your local machine.

git clone https://github.com/your-username/geneui-icons.git

Install Dependencies

Install the required dependencies using npm

npm install

or using yarn

yarn install

🆕 Adding a New Icon

Icon Naming Conventions

  • Icon Name: Must start with an uppercase letter and use PascalCase (e.g., AddUser, CheckCircle).
  • Icon Set: Choose between Major and Minor based on the icon's usage context.

Preparing Your SVG File

  1. Download: SVG from Figma or another source.
  2. Place the SVG: Add your SVG file to the svgs/ directory. (If directory not exist create it in the root of your cloned repository)

Using the Create Icon Script

We provide a script to streamline the process of adding a new icon.

  1. Run the Create Icon script
npm run create-icon
  1. Follow the prompts
  • Choose an Icon set: Select Major or Minor.
  • Enter the Icon name: Provide a unique name following the naming conventions.
  • Choose an Icon type: Select Outline or Filled.
  • Select the Icon SVG source file: Choose your SVG file from the list.
  • Enter the Icon keywords: Provide relevant keywords separated by commas.
  • Enter the Icon aliases: Provide any aliases separated by commas.
  • Enter the Icon description: Provide a brief description of the icon.
  1. Upon successful completion, the script will
  • Create the SVG and JSON metadata files in the icons/ directory.
  • Remove the source SVG file from the svgs/ directory.

Note: If you encounter any errors during this process, the script will provide detailed messages to help you resolve them.

❌ Removing an Icon

Using the Remove Icon Script

To remove an existing icon from the library

  1. Run the remove icon script
npm run remove-icon
  1. Follow the prompts
  • Select the Icon you want to remove: Choose the icon from the list.
  • Confirmation: Confirm that you want to remove the icon.
  1. The script will delete the icon's SVG and JSON metadata files from the icons/ directory.

⬆️ Submitting Your Changes

Use the branch release/1.0.x to push changes.

  1. Ensure you are in the branch release/1.0.x.
git status

otherwise

git checkout release/1.0.x
  1. Ensure your branch is up to date.
git pull
  1. Stage all changes in your local machine.
git add .
  1. Commit changes: write the action you have done (e.g Create, Remove) icon names.
git commit -m "Create clock, pencil icons and remove gear icon"
  1. Push your changes to origin.
git push

☎️ Contact

If you have any questions or need assistance, feel free to reach out