Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add devicon icons #69

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ejoubaud
Copy link

@ejoubaud ejoubaud commented Nov 15, 2022

Adds all icons from https://devicon.dev/ to cloudgram, into a new devicon namespace.

This adds a lot of language and framework icons, especially useful to show a Ruby or Go microservice, or a Rails/Express app component in an architecture diagram.

Devicon has a bunch of variants for each item: {item}-regular.svg (the most common, with the default logo), {item}-plain.svg (a flat design version), {item}-regular-wordmark.svg (regular with the name of the item appearing on the logo), {item}-plain-wordmark.svg...

The regular variant is present in most (237/277) so I'm removing the -regular suffix for it, to make it a short and friendly version (e.g. devicon.ruby instead of devicon.rubyRegular), but the other variants are kept available with the suffix (e.g. devicon.rubyPlain). This is especially important for items that don't have a -regular version (e.g. rails)

PS: You can try it out here: https://cloudgram-devicon.netlify.app/

We'd get the following errors on node v16.17.0:

```
(node:23575) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)
[2022-11-15 09:01:11.664 +0000] ERROR: ENOENT: no such file or directory, stat '.tmp/aws'
    Error: ENOENT: no such file or directory, stat '.tmp/aws'
[2022-11-15 09:01:11.665 +0000] ERROR: ENOENT: no such file or directory, stat '.tmp/k8s'
    Error: ENOENT: no such file or directory, stat '.tmp/k8s'
[2022-11-15 09:01:11.665 +0000] ERROR: ENOENT: no such file or directory, stat '.tmp/azure'
    Error: ENOENT: no such file or directory, stat '.tmp/azure'
[2022-11-15 09:01:11.665 +0000] ERROR: ENOENT: no such file or directory, stat '.tmp/gcp'
    Error: ENOENT: no such file or directory, stat '.tmp/gcp'
[2022-11-15 09:01:11.666 +0000] ERROR: ENOENT: no such file or directory, stat '.tmp/generic'
    Error: ENOENT: no such file or directory, stat '.tmp/generic'
[2022-11-15 09:01:11.666 +0000] ERROR: ENOENT: no such file or directory, stat '.tmp/devicon'
    Error: ENOENT: no such file or directory, stat '.tmp/devicon'
[2022-11-15 09:01:11.666 +0000] ERROR: Cannot read properties of undefined (reading 'provider')
    TypeError: Cannot read properties of undefined (reading 'provider')
        at file:///Users/joubaudemmanuel/src/cloudgram/scripts/assets.js:49:9
        at Array.reduce (<anonymous>)
        at file:///Users/joubaudemmanuel/src/cloudgram/scripts/assets.js:46:8
        at groupByProvider (file:///Users/joubaudemmanuel/src/cloudgram/scripts/assets.js:410:37)
```

This fixes both the deprecation warning and the error
Make it easier (for vimers) to browse the big config file
Generated code/images coming up in next commit
Most (but not all) devicon have a -original.svg as the canonical. We can use that as a short version in most cases.

But some (e.g. rails) don't have a -original, so we can't just filter on it. Also it might be interesting to keep the other variants.
SVGs + generated code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant