Thanks for taking the time to contribute to ProIcons! The following is a set of guidelines on contributing to ProIcons. Feel free to propose changes to the document via pull request.
Please send in your changes as a pull request here. Please make sure it is as descriptive as possible by explaining your changes in detail and showing images, if applicable.
If you're new to pull requests, check out this free guide.
You can request a new icon to be added to ProIcons via discussions.
Or, you can design your own icon and send it in as a pull request. See the development guide to learn how you can add your icon to the set. You can also modify an existing icon in the set.
To keep things organized, please include only one icon per pull request unless the icons are related.
The main ProIcons package is inside of the root src folder. Other packages are available in the packages folder. We use PNPM workspaces to manage and distribute multiple packages in a single monorepo.
The ProIcons documentation is built using VitePress. The Markdown files are located in the site/src/docs folder.
- Bun as a runtime
- PNPM as a package manager
- The codebase is written in TypeScript
- tsgo for .dts generation
- Vite with Rolldown for bundling
- VitePress for documentation
- Oxc for code formatting
First, clone the repository:
git clone https://github.com/ProCode-Software/proicons.git
Then install dependencies
pnpm install
The command above will install dependencies for all packages. If you want to install dependencies for a specific package, run pnpm --filter [package] install.
Note that you will need to install all dependencies if you want to build the icon set.
To build a package, run the ci script after installing dependencies:
pnpm --filter package-name run ciThis generates the icon modules for the package and builds the package into its dist folder.
Important
Make sure to use pnpm run ci, not pnpm ci.
The Figma desktop app is recommended, along with our Build Icon List plugin cloned and imported into Figma.
Please follow our design guidelines and naming conventions when creating your icon.
- Make sure you have cloned the ProIcons repository
- Select the dropdown in the title bar or right click in a file > Plugins > Development > Import plugin from manifest...
- Upload the
manifest.jsonfile located inproicons/tools/BuildIconList/.
-
After designing your icon, make it a component by pressing
Ctrl + Alt + KorCmd + Option + K -
In
Component configurationin the sidebar, add a description -
Run the Build Icon List plugin by right-clicking and selecting Plugins > Development > Build Icon List. A popup will show with your generated JSON.
Note
You may see a warning saying 1 icon doesn't have a category or similar. If you see this, replace NO CATEGORY in your JSON data with a category that is already in the set (case-sensitive).
This can be avoided by putting your icon in a frame (Ctrl + Alt + G/Cmd + Option + G) (Do not make this new frame into a component) and naming it your category before running the plugin.
- Paste the generated JSON into a new file at
proicons/in/in.json
- Create a new file at
proicons/in/in.jsonwith the following content:
Run pnpm run icons:build in the proicons folder to create PNG and SVG files from your icons in proicons/icons and add them to icons.json and icons.lock.json
To ensure your changes work, test your changes. This can be done by creating a separate test project and creating a symlink to your modified version using pnpm link as shown below:
# In your proicons folder
cd proicons
# Make sure to build your package when testing
pnpm run ci
pnpm link
# Create a testing folder and initialize a package
mkdir test
cd test
# Inside your test folder
pnpm init
# Create a symbolic link to the proicons package
pnpm link proiconsReplace proicons in the pnpm link command with the package you want to test.
{ "Icon Name": { "description": "Icon description", "category": "Icon category", "icon": "Paste your icon's escaped SVG code", }, // ...other icons }