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.
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 @geneui/icons repository repository to your local machine.
git clone https://github.com/your-username/geneui-icons.git
Install the required dependencies using npm
npm install
or using yarn
yarn install
- 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.
- Download: SVG from Figma or another source.
- Place the SVG: Add your SVG file to the
svgs/
directory. (If directory not exist create it in the root of your cloned repository)
We provide a script to streamline the process of adding a new icon.
- Run the Create Icon script
npm run create-icon
- 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.
- 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.
To remove an existing icon from the library
- Run the remove icon script
npm run remove-icon
- 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.
- The script will delete the icon's SVG and JSON metadata files from the
icons/
directory.
Use the branch release/1.0.x
to push changes.
- Ensure you are in the branch
release/1.0.x
.
git status
otherwise
git checkout release/1.0.x
- Ensure your branch is up to date.
git pull
- Stage all changes in your local machine.
git add .
- 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"
- Push your changes to origin.
git push
If you have any questions or need assistance, feel free to reach out
- Maintainer: Hamik Hambardzumyan
- Email: [email protected]
- GitHub: @hamikhambardzumyan