Contributing to Devicon

First of all, thanks for taking the time to contribute! This project can only grow and live by your countless contributions. To keep this project maintainable, we have developed some guidelines for our contributors.

Table of Content


Terms

Here are some terms that we will use in this repo:

  1. "Technology" is used to describe a software, libraries, tool, etc...
  2. "Icon" refers to the svgs and icons version of a technology as a whole.
  3. "SVG/svg" refers to the svg versions of the Icons.
  4. "icon" (lowercase) refers specficially to the font icon versions of the Icons.

Overview on Submitting Icons

Here is what you have to do to submit your icons to the repo.

  1. Create the svgs for each svg versions that you have
  2. Put the svgs of each Icon into its own folders in /icons
  3. Update the devicon.json to include the new Icon
  4. Create a separated pull request (PR) towards the develop branch for each Icon.
  5. Include the name of the Icon in the pull request title in this format: new icon: Icon name (versions)
  6. Optional: Add images of the new svg(s) to the description of the pull request. This would help speed up the review process
  7. Optional: Reference the issues regarding the new icon.
  8. Wait for a maintainer to review your changes. They will run a script to check your icons.
  9. If there are no issues, they will accept your pull request and merge it using squash merging. If there are any problems, they will let you know and give you a chance to fix it.

Versions and Naming Conventions

For the technology name, make the file and folder name lowercase and concatenate them. For example:

Each icon/svg can come in different versions. So far, we have:

Notes


SVG Standards

Before you submit your logos/svgs, please ensure that they meet the following standard:


Organizational Guidelines


Updating the devicon.json

Before you open a PR into Devicon, you must update the devicon.json. This is essential for our build script to work and to document your work.

Here is the object that each of your Icon must have:

  
    {
        "name": string, // the official name of the technology. Must be lower case, no space and don't have the dash '-' character.
        "tags": string[], // list of tags relating to the technology for search purpose
        "versions": {
            "svg": VersionString[], // list the svgs that you have 
            "font": VersionString[] // list the fonts acceptable versions that you have
        },
        "color": string, // the main color of the logo. Only track 1 color
        "aliases": AliasObj[] // keeps track of the aliases for the font versions ONLY
    }
  

Here is what VersionString means:

  1. It's the version part of an svg file's name
  2. If you have "html5-original", the version string would be "original"
  3. If you have "react-line-wordmark", the version string would be "line-wordmark"
  4. See naming conventions section for more details

Here is the AliasObj interface:

     
    {
        "base": VersionString, // the base version
        "alias": VersionString // the alias version that's similar to the base version
    }
  

Example

As an example, let's assume you have created the svgs for Redhat and Amazon Web Services logos.

For the Redhat svg, you have the "original", "original-wordmark", "plain", and "plain-wordmark" versions.

For the Amazon Web Services svgs, you have the "original", "original-wordmark", "plain-wordmark" versions. The "original" version is simple enough to be a "plain" version as well. Note that we are not using the acronym AWS.

  1. Put the svgs for each logo that you have into its own folders in /icons
  2. Update the devicon.json
  3. Create a separate pull request (PR) for each Icon.
  4. Include the name of the icon in the pull request. Follow this format: "new icon: Icon name (versions}})"
  5. For the rest of the steps, you can follow Overview on Submitting Icon

Requesting an Icon

To request an icon, you can create an issue in the repo. Please follow these simple guidelines:


Maintainer/Reviewer/Teams

Devicon is living by it's contributors and maintainers. Everyone can and is asked to contribute to this project. You don't have to be in a team to contribute!

The branches master and develop are protected branches and only members with corresponding permissions (see teams below) are able to push changes to them. Additional branches must follow the pattern username/feature/description. The /feature/ indicates that a change is made to existing code (regardless if it's a fix, refactor or actual feature). The naming convention is based on the gitflow-workflow.

For organisational purposes we introduced teams with permissions and responsibilities:

Supporter (@devicons/supporter)
Members of this team are responsible for reviewing pull request (auto assigned), managing issues and preparing the upcoming release.
Supporters have Write access to the repository (allowing them to create own branches) and are allowed to push changes to the develop branch (pull request and status checks required).
Maintainer (@devicons/maintainer)
Maintainer role inherits from the 'Supporter' role and adds Maintainer permission to the repository. Members of this team are allowed to publish a new release (push master branch after pull request and status checks).

Wanna join the team? Please open a public discussion where you introduce yourself.
New member requests have to be approved by all active members of the team Maintainer. Every member of this team has a veto permission to reject a new member.


Regarding The Build Script

To make adding icons easier for repo maintainers, we rely on GitHub Actions, Python, Selenium, and Gulp to automate our tasks.

So far, the tasks in the build script are:

There are also other tasks that we are automating, such as:

Discord server

We are running a Discord server. You can go here to talk, discuss, and more with the maintainers and other people, too. Here's the invitation: https://discord.gg/hScy8KWACQ. If you don't have a GitHub account but want to suggest ideas or new icons, you can do that here in our Discord channel. Note that the Discord server is unofficial, and Devicons is still being maintained via GitHub.

Release strategy, conventions, preparation and execution

Release strategy

Devicon does not follow a strict release plan. A new release is depended on current amount of contributions, required bugfixes/patches and will be discussed by the team of maintainers.

Generally speaking: A new release will be published when new icons are added or a bug was fixed. When it's predictable that multiple icons are added in a foreseeable amount of time they are usually wrapped together.

Conventions

The version naming follows the rules of Semantic Versioning. Given a version number MAJOR.MINOR.PATCH, increment the:

Release preparation and execution
  1. Define the next release version number based on the conventions
  2. Checkout development as draft-release branch
  3. Bump the package version using npm version vMAJOR.MINOR.PATCH -m "bump npm version to vMAJOR.MINOR.PATCH" (see #487)
  4. Push the branch draft-release
  5. Manually trigger the workflow build_icons.yml (which has a workflow_dispatch event trigger) and select the branch draft-release as target branch. This will build a font version of all icons using icomoon and automatically creates a pull request to merge the build result back into draft-release
  6. Review and approve the auto-create pull request created by the action of the step above
  7. Create a pull request towards development. Mention the release number in the pull request title and add information about all new icons, fixes, features and enhancements in the description of the pull request. Take the commits as a guideline. It's also a good idea to mention and thank all contributions who participated in the release (take description of #504 as an example).
  8. Wait for review and approval of the pull request (DON'T perform a squash-merge)
  9. Once merged create a pull request with BASE master and HEAD development. Copy the description of the earlier pull request.
  10. Since it was already approved in the 'development' stage a maintainer is allowed to merge it (DON'T perform a squash-merge).
  11. Create a new release using vMAJOR.MINOR.PATCH as tag and release title. Use the earlier created description as description of the release.
  12. Publishing the release will trigger the npm_publish.yml workflow which will execute a npm publish leading to a updated npm package (vMAJOR.MINOR.PATCH).