Release 10 new icons and 8 updated icons (v4.11.0)

# New Icons

- AOL (#4954)
- Blockchain.com (#4818)
- China Eastern Airlines (#4827)
- Cloudera (#4812)
- D-Wave Systems (#4825)
- Major League Hacking (#4915)
- Oxygen (#4839)
- Pug (#4714)
- Textpattern (#4966)
- Windows Terminal (#4956)

# Updated Icons

- Android Auto (#4400)
- Google Street View (#4683)
- Google Tag Manager (#4586)
- LinkedIn (#4985, #4939)
- New Japan Pro-Wrestling (#4930)
- openSUSE (#4904)
- Roundcube (#4495)
- Svelte (#4907)
This commit is contained in:
Eric Cornelissen 2021-02-14 14:36:57 +01:00 committed by GitHub
commit 5876b206b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 205 additions and 127 deletions

View File

@ -49,7 +49,7 @@ jobs:
run: |
RELEASE_TITLE=$(echo "${{ steps.commit.outputs.git-message }}" | head -n 1)
echo "::set-output name=title::$RELEASE_TITLE"
RELEASE_BODY=$(echo "${{ steps.commit.outputs.git-message }}" | tail -n +3)
RELEASE_BODY=$(echo "${{ steps.commit.outputs.git-message }}" | tail -n $(expr $(echo "${{ steps.commit.outputs.git-message }}" | wc -l) - 1))
echo "::set-output name=body::$RELEASE_BODY"
- name: Get release version
id: get-version

File diff suppressed because one or more lines are too long

View File

@ -50,7 +50,13 @@ The API can then be used as follows:
```javascript
const simpleIcons = require('simple-icons');
console.log(simpleIcons.get('Simple Icons'));
// Get a specific icon by its name as:
simpleIcons.get('[ICON NAME]');
// For example:
const icon = simpleIcons.get('simpleicons');
console.log(icon);
/*
{
@ -68,6 +74,10 @@ Alternatively you can import the needed icons individually.
This is useful if you are e.g. compiling your code with [webpack](https://webpack.js.org/) and therefore have to be mindful of your package size:
```javascript
// Import a specific icon by its name as:
require('simple-icons/icons/[ICON NAME]');
// For example:
const icon = require('simple-icons/icons/simpleicons');
console.log(icon);

View File

@ -427,8 +427,8 @@
},
{
"title": "Android Auto",
"hex": "4285F4",
"source": "https://partnermarketinghub.withgoogle.com/#/brands/"
"hex": "3DDC84",
"source": "https://thepartnermarketinghub.withgoogle.com/brands/android-auto/"
},
{
"title": "Android Studio",
@ -485,6 +485,12 @@
"hex": "EF443B",
"source": "https://anydesk.com/"
},
{
"title": "AOL",
"hex": "3399FF",
"source": "https://www.aol.com/",
"guidelines": "https://styleguide.aol.com/"
},
{
"title": "Apache",
"hex": "D22128",
@ -1036,6 +1042,12 @@
"hex": "F5792A",
"source": "https://www.blender.org/about/logo/"
},
{
"title": "Blockchain.com",
"hex": "121D33",
"source": "https://www.blockchain.com/",
"guidelines": "https://www.blockchain.com/en/press"
},
{
"title": "Blogger",
"hex": "FF5722",
@ -1351,6 +1363,11 @@
"hex": "CD9834",
"source": "https://www.chevrolet.com/content/dam/chevrolet/na/us/english/index/shopping-tools/download-catalog/02-pdf/2019-chevrolet-corvette-catalog.pdf"
},
{
"title": "China Eastern Airlines",
"hex": "1A2477",
"source": "https://uk.ceair.com/newCMS/uk/en/content/en_Footer/Support/201904/t20190404_5763.html"
},
{
"title": "China Southern Airlines",
"hex": "008BCB",
@ -1451,6 +1468,11 @@
"hex": "407AFC",
"source": "https://cloudcannon.com/"
},
{
"title": "Cloudera",
"hex": "F96702",
"source": "https://www.cloudera.com/"
},
{
"title": "Cloudflare",
"hex": "F38020",
@ -1798,6 +1820,11 @@
"hex": "17202C",
"source": "https://cypress.io"
},
{
"title": "D-Wave Systems",
"hex": "008CD7",
"source": "https://www.dwavesys.com/"
},
{
"title": "D3.js",
"hex": "F9A03C",
@ -4343,8 +4370,9 @@
},
{
"title": "LinkedIn",
"hex": "0077B5",
"source": "https://brand.linkedin.com"
"hex": "0A66C2",
"source": "https://brand.linkedin.com",
"guidelines": "https://brand.linkedin.com/policies"
},
{
"title": "Linktree",
@ -4501,6 +4529,11 @@
"hex": "FFE01B",
"source": "http://mailchimp.com/about/brand-assets"
},
{
"title": "Major League Hacking",
"hex": "265A8F",
"source": "https://mlh.io/brand-guidelines"
},
{
"title": "MakerBot",
"hex": "FF1E0D",
@ -5059,7 +5092,7 @@
{
"title": "New Japan Pro-Wrestling",
"hex": "FF160B",
"source": "https://en.wikipedia.org/wiki/File:New_Japan_Pro_Wrestling_Logo_2.svg"
"source": "https://en.wikipedia.org/wiki/File:NJPW_World_Logo.svg"
},
{
"title": "New Relic",
@ -5394,7 +5427,8 @@
{
"title": "openSUSE",
"hex": "73BA25",
"source": "https://en.opensuse.org/Portal:Artwork"
"source": "https://github.com/openSUSE/artwork/blob/33e94aa76837c09f03d1712705949b71a246a53b/logos/buttons/button-colour.svg",
"guidelines": "https://en.opensuse.org/Portal:Artwork"
},
{
"title": "OpenVPN",
@ -5471,6 +5505,12 @@
"hex": "000000",
"source": "https://github.com/OWASP/www-event-2020-07-virtual/blob/eefbef6c1afdd1dee2af11e7f44ad005b25ad48c/assets/images/logo.svg"
},
{
"title": "Oxygen",
"hex": "3A209E",
"source": "https://oxygenbuilder.com/",
"guidelines": "https://oxygenbuilder.com/trademark-policy/"
},
{
"title": "OYO",
"hex": "EE2E24",
@ -6006,6 +6046,11 @@
"hex": "326599",
"source": "https://pubmed.ncbi.nlm.nih.gov/"
},
{
"title": "Pug",
"hex": "A86454",
"source": "https://github.com/pugjs/pug-logo/blob/61429fc45b5a411b83bdb5c99a61084d3054d1e6/SVG/pug-final-logo_-mono-64.svg"
},
{
"title": "Puppet",
"hex": "FFAE1A",
@ -6419,7 +6464,7 @@
{
"title": "Roundcube",
"hex": "37BEFF",
"source": "https://roundcube.net/images/roundcube_logo_icon.svg"
"source": "https://roundcube.net/"
},
{
"title": "RSS",
@ -7324,7 +7369,7 @@
{
"title": "Svelte",
"hex": "FF3E00",
"source": "https://github.com/sveltejs/svelte/tree/master/site/static"
"source": "https://github.com/sveltejs/branding/blob/c4dfca6743572087a6aef0e109ffe3d95596e86a/svelte-logo.svg"
},
{
"title": "SVG",
@ -7511,6 +7556,11 @@
"hex": "E33332",
"source": "https://testing-library.com/"
},
{
"title": "Textpattern",
"hex": "FFD942",
"source": "https://textpattern.com/"
},
{
"title": "The Conversation",
"hex": "D8352A",
@ -8377,6 +8427,11 @@
"hex": "008080",
"source": "https://en.wikipedia.org/wiki/Windows_95"
},
{
"title": "Windows Terminal",
"hex": "4D4D4D",
"source": "https://github.com/microsoft/terminal/blob/a90289548f8548bf5c370a4b141b4b815c22616b/res/terminal/Terminal_HC.svg"
},
{
"title": "Windows XP",
"hex": "003399",

1
icons/aol.svg Normal file
View File

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>AOL icon</title><path d="M13.07 9.334c2.526 0 3.74 1.997 3.74 3.706 0 1.709-1.214 3.706-3.74 3.706-2.527 0-3.74-1.997-3.74-3.706 0-1.709 1.213-3.706 3.74-3.706m0 5.465c.9 0 1.663-.741 1.663-1.759 0-1.018-.763-1.759-1.663-1.759s-1.664.741-1.664 1.759c0 1.018.764 1.76 1.664 1.76m4.913-7.546h2.104v9.298h-2.104zm4.618 6.567a1.398 1.398 0 1 0 .002 2.796 1.398 1.398 0 0 0-.002-2.796M5.536 7.254H3.662L0 16.55h2.482l.49-1.343h3.23l.452 1.343H9.16zm-1.91 6.068L4.6 10.08l.974 3.242H3.626z"/></svg>

After

Width:  |  Height:  |  Size: 570 B

View File

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Blockchain.com icon</title><path d="M19.8285 6.6117l-5.52-5.535a3.1352 3.1352 0 00-4.5 0l-5.535 5.535 7.755 3.87zm2.118 2.235l1.095 1.095a3.12 3.12 0 010 4.5L14.22 23.3502a2.6846 2.6846 0 01-.72.525V13.0767zm-19.893 0l-1.095 1.095a3.1198 3.1198 0 000 4.5L9.78 23.3502c.2091.214.4525.3914.72.525V13.0767z"/></svg>

After

Width:  |  Height:  |  Size: 390 B

View File

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>China Eastern Airlines icon</title><path d="M11.572 2.383c-1.846 0-2.245.238-2.962 1.205-.38.516-3.568 4.915-5.009 6.898-.18.236-.446.486-1.03.486H0v.004c3.05 8.61 6.324 10.64 9.602 10.64h5.178c.07 0 .146-.08-.041-.124-3.805-.953-7.57-3.984-7.589-6.962.066 2.464 5.255 3.315 10.876 4.016.098.011.093-.065.063-.12l-.17-.293c-.02-.039-.043-.068-.124-.088-3.094-.787-6.242-1.938-6.242-3.01 0-2.032 5.272-4.042 11.27-4.96.195-.04.29-.076.42-.18.17-.136.536-.433.695-.554.096-.085.061-.11.025-.11-.16 0-.326.004-.485.01-7.898.219-15.544 2.008-16.253 4.55-.002.014-.01.027-.014.04.937-4.652 7.198-9.162 15.008-11.28.18-.052.239-.168.014-.168Z"/></svg>

After

Width:  |  Height:  |  Size: 723 B

1
icons/cloudera.svg Normal file
View File

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Cloudera icon</title><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm.344 20.251a8.25 8.25 0 1 1 0-16.502 8.21 8.21 0 0 1 5.633 2.234L15.519 8.53a4.686 4.686 0 0 0-3.175-1.239 4.709 4.709 0 1 0 3.284 8.081l2.657 2.346a8.224 8.224 0 0 1-5.941 2.533z"/></svg>

After

Width:  |  Height:  |  Size: 368 B

1
icons/d-wavesystems.svg Normal file
View File

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>D-Wave Systems icon</title><path d="M10.1062 12.0046c0 1.5815-1.2842 2.8636-2.8685 2.8636-1.5842 0-2.8684-1.282-2.8684-2.8636 0-1.5815 1.2842-2.8635 2.8684-2.8635 1.5843 0 2.8685 1.2821 2.8685 2.8635zM7.2377 0C5.6536 0 4.3693 1.2817 4.3693 2.8628s1.2842 2.8629 2.8684 2.8629c1.5842 0 2.8685-1.2817 2.8685-2.8629C10.1062 1.2817 8.822 0 7.2377 0zm9.5246 18.2781c-1.5838 0-2.8677 1.2764-2.8677 2.8636 0 1.5763 1.2835 2.8583 2.8677 2.8583 1.5845 0 2.8684-1.282 2.8684-2.8583 0-1.5872-1.2843-2.8636-2.8684-2.8636zm-2.8685-6.2735c0-1.5815 1.2842-2.8635 2.8685-2.8635 1.5842 0 2.8684 1.282 2.8684 2.8635 0 1.5815-1.2842 2.8636-2.8684 2.8636-1.5843 0-2.8685-1.282-2.8685-2.8636zm.5 0c0 1.3033 1.0625 2.3636 2.3685 2.3636s2.3684-1.0603 2.3684-2.3636c0-1.3032-1.0624-2.3635-2.3684-2.3635s-2.3685 1.0603-2.3685 2.3635z"/></svg>

After

Width:  |  Height:  |  Size: 895 B

View File

@ -1 +1 @@
<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>Google Street View icon</title><path d="M18.285 0c-.11 0-.218.004-.326.01-.03.001-.062.005-.092.008a5.723 5.723 0 00-.549.064c-.037.006-.074.015-.111.022-.07.013-.138.027-.207.042l-.1.024a5.635 5.635 0 00-.273.074l-.023.008a5.67 5.67 0 00-.301.102c-.022.007-.043.017-.065.025a5.669 5.669 0 00-.22.09l-.096.043a5.765 5.765 0 00-.184.088l-.097.05c-.061.032-.122.064-.182.098l-.088.05c-.066.04-.13.082-.195.124l-.063.039a5.746 5.746 0 00-.488.367l-.072.063a5.803 5.803 0 00-.451.433 5.7 5.7 0 00-.14.156l-.06.07a5.692 5.692 0 00-1.33 3.664 5.712 5.712 0 009.143 4.571l.017-.014a5.778 5.778 0 00.452-.38l.062-.06a5.747 5.747 0 00.37-.39l.054-.062c.06-.07.116-.143.172-.217l.017-.021.002-.004c.06-.08.118-.163.174-.246.018-.026.034-.054.05-.08.04-.06.078-.12.114-.182l.051-.088c.035-.061.069-.123.102-.186.016-.03.033-.06.048-.091.03-.06.058-.121.086-.182l.047-.103c.031-.072.06-.144.088-.217l.025-.065c.036-.097.07-.195.1-.295l.02-.07c.022-.075.043-.15.062-.227a5.675 5.675 0 00.068-.313 5.758 5.758 0 00.086-.645l.008-.112a5.759 5.759 0 00-.056-1.191 5.677 5.677 0 00-.114-.559 5.655 5.655 0 00-.648-1.533 5.73 5.73 0 00-.477-.672A5.76 5.76 0 0021.248.826l-.086-.049a5.716 5.716 0 00-.398-.215A5.681 5.681 0 0018.285 0zM1.715 2.285A1.72 1.72 0 000 3.995v18.29L12.941 9.344a6.426 6.426 0 01-1.12-3.63c0-1.26.38-2.432 1.007-3.429H1.715zM4.857 4c.848 0 1.557.31 2.102.818l-.912.891a1.698 1.698 0 00-1.19-.459c-.818 0-1.512.551-1.76 1.295a1.889 1.889 0 000 1.195c.248.744.942 1.295 1.76 1.295.46 0 .808-.121 1.067-.297.396-.27.624-.722.623-1.025h-1.69V6.57h2.94c.045.197.078.386.078.645 0 .957-.342 1.765-.936 2.312-.52.48-1.233.758-2.082.758a3.142 3.142 0 110-6.285zm9.8 7.059l-2.452 2.45a12 12 0 014.428-1.56 6.456 6.456 0 01-1.977-.89zm7.058.113a6.601 6.601 0 01-1.774.775c.607.087 1.2.22 1.774.395v-1.17zm-3.43 1.4c-2.51 0-4.868.864-6.73 2.264-.425.34-.698.863-.698 1.45V24H20a1.72 1.72 0 001.715-1.715v-9.164a11.078 11.078 0 00-3.43-.549zm-8.025 2.883L1.715 24h8.392v-7.715c0-.292.063-.567.153-.83Z"/></svg>
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Google Street View icon</title><path d="M12.571 5.714a5.714 5.714 0 1 1 11.43 0 5.714 5.714 0 0 1-11.43 0zm2.264 5.165l-3.502 3.502c2.015-1.488 4.48-2.31 6.953-2.31 1.155 0 2.307.182 3.428.53v-1.709a6.176 6.176 0 0 1-3.428 1.037 6.177 6.177 0 0 1-3.45-1.05zm6.88 11.407V13.12a11.074 11.074 0 0 0-3.43-.55 11.25 11.25 0 0 0-6.731 2.265c-.425.34-.697.863-.697 1.45V24H20a1.72 1.72 0 0 0 1.714-1.714zM13.12 9.165L.001 22.285V4a1.72 1.72 0 0 1 1.713-1.714h11.394a6.176 6.176 0 0 0-1.037 3.428c0 1.276.388 2.463 1.05 3.45zm-5.246-1.95a2.7 2.7 0 0 0-.077-.644h-2.94v1.142h1.69c.001.303-.228.755-.625 1.025-.258.176-.606.298-1.066.298-.818 0-1.512-.552-1.76-1.295a1.887 1.887 0 0 1 0-1.196c.248-.743.942-1.295 1.76-1.295.6 0 .987.268 1.19.458l.913-.889A3.018 3.018 0 0 0 4.857 4a3.143 3.143 0 1 0 0 6.287c.848 0 1.563-.279 2.083-.759.593-.547.935-1.356.935-2.313zm2.482 9.07c0-.511.17-.995.471-1.399L1.714 24h8.643v-7.714z"/></svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1002 B

View File

@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Google Tag Manager icon</title><path d="M11.93 18.136c1.62 0 2.933 1.313 2.933 2.932 0 1.62-1.312 2.932-2.932 2.932C10.31 24 9 22.688 9 21.069c0-1.62 1.312-2.932 2.93-2.932zm11.19-8.258l-9-9c-1.17-1.17-3.07-1.17-4.24 0-1.172 1.17-1.172 3.07 0 4.242l6.865 6.866-4.493 4.588 2.12 2.21c.58.622.9 1.433.9 2.283 0 .313-.044.615-.125.903l7.974-7.85c1.173-1.17 1.173-3.07 0-4.242zM11.67 7.49L9.59 5.41c-.644-.644-1-1.5-1-2.41 0-.333.05-.66.14-.97L.878 9.81c-1.17 1.17-1.17 3.066 0 4.237l7.825 7.875a3.349 3.349 0 0 1-.11-.854c0-1.842 1.498-3.34 3.34-3.34.35 0 .69.054 1.008.155l-5.706-5.955z"/></svg>
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Google Tag Manager icon</title><path d="M12.003 0a3 3 0 0 0-2.121 5.121l6.865 6.865-4.446 4.541 1.745 1.836a3.432 3.432 0 0 1 .7.739l.012.011-.001.002a3.432 3.432 0 0 1 .609 1.953 3.432 3.432 0 0 1-.09.78l7.75-7.647c.031-.029.067-.05.098-.08.023-.023.038-.052.06-.076a2.994 2.994 0 0 0-.06-4.166l-9-9A2.99 2.99 0 0 0 12.003 0zM8.63 2.133L.88 9.809a2.998 2.998 0 0 0 0 4.238l7.7 7.75a3.432 3.432 0 0 1-.077-.729 3.432 3.432 0 0 1 3.431-3.431 3.432 3.432 0 0 1 .826.101l-5.523-5.81 4.371-4.373-2.08-2.08c-.903-.904-1.193-2.183-.898-3.342zm3.304 16.004a2.932 2.932 0 0 0-2.931 2.931A2.932 2.932 0 0 0 11.934 24a2.932 2.932 0 0 0 2.932-2.932 2.932 2.932 0 0 0-2.932-2.931z"/></svg>

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 755 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.9 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>openSUSE icon</title><path d="M21.51 8.107a.976.976 0 0 0-.708.264.993.993 0 0 0 .64 1.714.991.991 0 0 0 1.024-.954.992.992 0 0 0-.955-1.024zm.162 1.082c-.242 0-.438-.131-.438-.292 0-.163.196-.293.438-.293.243 0 .44.13.44.293 0 .16-.197.292-.44.292zm2.306 1.18c.007-.006.024-.02.022-.034-.055-.343-.565-2.004-.952-2.404-.106-.109-.191-.216-.364-.317-1.398-.814-4.713-1.306-4.869-1.328 0 0-.015-.004-.026.007-.009.008-.01.024-.01.024l-.015.764c-.339-.114-2.8-.91-5.108-.99C10.7 6.024 7.85 5.77 4.072 8.093l-.111.07C2.184 9.27.957 10.637.316 12.224c-.201.5-.472 1.628-.204 2.688.116.464.331.93.621 1.347.656.943 1.757 1.568 2.943 1.674 1.674.15 2.941-.602 3.392-2.01.31-.971 0-2.397-1.188-3.124-.967-.591-2.006-.457-2.609-.058-.523.347-.819.886-.814 1.477.012 1.05.917 1.608 1.567 1.61.189 0 .378-.033.592-.103a.921.921 0 0 0 .227-.1l.025-.015.015-.01-.005.003a.535.535 0 0 0 .217-.587.533.533 0 0 0-.612-.377l-.036.008-.05.015-.072.025c-.15.037-.262.04-.286.041-.076-.005-.45-.117-.45-.527v-.005c0-.151.06-.257.093-.314.117-.183.435-.362.866-.325.565.05.973.34 1.243.886.25.508.185 1.134-.17 1.592-.35.454-.976.647-1.809.557a2.48 2.48 0 0 1-1.946-1.327c-.389-.735-.41-1.607-.055-2.276.85-1.604 2.455-1.587 3.334-1.435 1.302.226 2.784 1.427 3.309 2.814.085.22.128.396.166.556l.057.24 1.47.718c.032.015.043.02.055.011.016-.011.007-.042.007-.042-.01-.033-.03-.063-.065-.475-.027-.365-.084-1.365.42-1.86.195-.195.492-.367.728-.423.964-.235 2.094-.073 3.163 1.164.553.64.823.93.959 1.061 0 0 .03.03.047.043.018.015.03.027.055.041.045.025 1.838.85 1.838.85s.022.011.037-.008c.016-.02.001-.038.001-.038-.012-.014-1.137-1.468-.937-2.665.158-.954.917-.867 1.967-.749.343.04.733.085 1.137.094 1.127.007 2.342-.201 3.09-.529.485-.21.794-.35.988-.526.07-.058.106-.152.143-.253l.027-.066c.031-.082.077-.254.097-.348.009-.042.018-.083-.016-.11-.032-.024-.104.02-.104.02-.329.198-1.15.573-1.919.589-.954.019-2.887-.966-3.087-1.07-.134-.32-.268-.639-.404-.957 1.383.911 2.53 1.415 3.408 1.492.977.088 1.74-.446 2.07-.668.043-.028.086-.06.126-.092zm-3.923-1.311c.014-.379.173-.73.45-.988a1.414 1.414 0 0 1 1.017-.38 1.423 1.423 0 0 1 1.37 1.468c-.015.379-.174.73-.45.987-.277.26-.638.394-1.019.381a1.424 1.424 0 0 1-1.368-1.468z"/></svg>
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>openSUSE icon</title><path d="M10.724 0a12 12 0 0 0-9.448 4.623c1.464.391 2.5.727 2.81.832.005-.19.037-1.893.037-1.893s.004-.04.025-.06c.026-.026.065-.018.065-.018.385.056 8.602 1.274 12.066 3.292.427.25.638.517.902.786.958.99 2.223 5.108 2.359 5.957.005.033-.036.07-.054.083a5.177 5.177 0 0 1-.313.228c-.82.55-2.708 1.872-5.13 1.656-2.176-.193-5.018-1.44-8.445-3.699.336.79.668 1.58 1 2.371.497.258 5.287 2.7 7.651 2.651 1.904-.04 3.941-.968 4.756-1.458 0 0 .179-.108.257-.048.085.066.061.167.041.27-.05.234-.164.66-.242.863l-.065.165c-.093.25-.183.482-.356.625-.48.436-1.246.784-2.446 1.305-1.855.812-4.865 1.328-7.66 1.31-1.001-.022-1.968-.133-2.817-.232-1.743-.197-3.161-.357-4.026.269A12 12 0 0 0 10.724 24a12 12 0 0 0 12-12 12 12 0 0 0-12-12zM13.4 6.963a3.503 3.503 0 0 0-2.521.942 3.498 3.498 0 0 0-1.114 2.449 3.528 3.528 0 0 0 3.39 3.64 3.48 3.48 0 0 0 2.524-.946 3.504 3.504 0 0 0 1.114-2.446 3.527 3.527 0 0 0-3.393-3.64zm-.03 1.035a2.458 2.458 0 0 1 2.368 2.539 2.43 2.43 0 0 1-.774 1.706 2.456 2.456 0 0 1-1.762.659 2.461 2.461 0 0 1-2.364-2.542c.02-.655.3-1.26.777-1.707a2.419 2.419 0 0 1 1.756-.655zm.402 1.23c-.602 0-1.087.325-1.087.727 0 .4.485.725 1.087.725.6 0 1.088-.326 1.088-.725 0-.402-.487-.726-1.088-.726Z"/></svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

1
icons/oxygen.svg Normal file
View File

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Oxygen icon</title><path d="M23.89 12c0-6.627-5.324-12-11.89-12S.109 5.373.109 12 5.433 24 12 24c2.014 0 3.91-.508 5.573-1.4.62.354 1.338.558 2.105.558 2.326 0 4.212-1.865 4.212-4.165 0-.946-.319-1.818-.857-2.517.552-1.383.857-2.894.857-4.476zm-21.402.005c0-5.448 4.269-9.864 9.535-9.864s9.535 4.416 9.535 9.864c0 1.07-.166 2.099-.471 3.063a4.23 4.23 0 0 0-1.408-.239c-2.326 0-4.212 1.865-4.212 4.165 0 .72.185 1.397.51 1.988a9.21 9.21 0 0 1-3.953.888c-5.267-.001-9.536-4.418-9.536-9.865zm17.191 9.864c-1.514.021-2.84-1.267-2.819-2.788 0-1.54 1.262-2.788 2.819-2.788 1.507-.025 2.843 1.27 2.819 2.788 0 1.54-1.263 2.788-2.819 2.788z"/></svg>

After

Width:  |  Height:  |  Size: 719 B

1
icons/pug.svg Normal file
View File

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Pug icon</title><path d="M12.0938 4.6358c-2.0663 0-3.6817.204-4.9221.5704a6.4511 6.4511 0 0 0 .0918-.084c.0374-.0375-.0507-.0625-.2285-.0684-.5335-.0175-1.8672.1436-2.9904.7051-1.273.599-4.118 3.7446-4.0432 3.9318.075.1872 1.4594 1.3458 1.8712 1.795.2621.2995 1.0485 2.9592 1.7599 2.51.189-.131.2656-.651.33-1.2931.0582.4975.1155 1.013.1934 1.4805.1123.7488 1.087 1.3474 1.1993 2.0587.1391 1.0138.7614 1.7234 1.9805 2.174.4847.6681 1.2382.3299 1.801.6347.8984.4867 1.9091.2617 2.92.2617 1.0108 0 1.984.186 2.92-.3007.576-.2995 1.32.0311 1.8087-.5802 1.2254-.4494 1.8319-1.1633 1.9727-2.1895.1123-.7113 1.0479-1.3099 1.1602-2.0587.0633-.3799.1102-.802.1582-1.2032.0568.4994.13.9042.291 1.0157.674.4493 1.4978-2.2104 1.7599-2.5099.4118-.4492 1.7963-1.6078 1.8712-1.795.0748-.1872-2.8074-3.3327-4.0803-3.9318-1.1231-.5615-2.4568-.7226-2.9903-.705-.167.0054-.2454.0287-.2247.0624-1.1748-.308-2.6728-.4805-4.6095-.4805zm.0293.5c2.2035 0 3.8486.2253 5.01.6153.1335.0449.2387.098.3593.1465.6901.715 1.6233 1.831 2.0138 3.1173.0246.081.0405.1658.0625.248.0003.0013-.0003.0028 0 .004v.0039c.0453.77.3158 1.4169.2305 1.9903-.1536.9982-.2285 1.9726-.373 2.84l-.002.0039v.0039c-.0289.1922-.218.4762-.4786.8067-.2606.3305-.5955.7024-.6817 1.248v.006l-.0019.0038c-.1006.733-.4207 1.1997-1.17 1.5821.1252-.4447.2051-1.055.2051-1.963.0374-1.1231.0766-1.5722-.8594-2.6954-.7184-.9236-1.704-1.5746-2.793-1.8985-.1111-.3899-.7217-.836-1.551-.836-.8285 0-1.4147.422-1.5352.8204-1.1098.3182-2.116.9759-2.8458 1.9141-.936 1.1232-.8594 1.6097-.8594 2.6955 0 .9037.0795 1.5135.2031 1.961-.7697-.385-1.1078-.857-1.207-1.5802v-.0097c-.0875-.5541-.4371-.9235-.7071-1.254-.27-.3305-.4626-.6166-.4903-.8008l-.002-.004v-.0038c-.1444-.8669-.2196-1.8406-.373-2.838v-.002c-.0853-.5734.1833-1.2203.2285-1.9903v.0156c.0131-.1437.0173-.241.0254-.371.3604-1.1587 1.1531-2.1726 1.8048-2.8752a6.4135 6.4135 0 0 1 .7246-.289c1.1921-.3916 2.8593-.6153 5.0628-.6153zm-5.2092 3.805a1.6473 1.6473 0 0 0-1.6349 1.6484 1.6473 1.6473 0 0 0 1.6485 1.6466 1.6473 1.6473 0 0 0 .4415-.0606c.3487-.3747.7177-.7223 1.1113-1.041a1.6473 1.6473 0 0 0 .0938-.545 1.6473 1.6473 0 0 0-1.6466-1.6485 1.6473 1.6473 0 0 0-.0136 0zm10.2973 0a1.6473 1.6473 0 0 0-1.6368 1.6484 1.6473 1.6473 0 0 0 .1504.6836c.3125.2642.611.547.8945.8477a1.6473 1.6473 0 0 0 .6036.1153 1.6473 1.6473 0 0 0 1.6465-1.6466 1.6473 1.6473 0 0 0-1.6465-1.6485 1.6473 1.6473 0 0 0-.0117 0zm-9.8715.4863a.4118.4118 0 0 1 .4101.412.4118.4118 0 0 1-.4101.4122.4118.4118 0 0 1-.4122-.4121.4118.4118 0 0 1 .4122-.4121zm9.471 0a.4118.4118 0 0 1 .4122.412.4118.4118 0 0 1-.4121.4122.4118.4118 0 0 1-.4122-.4121.4118.4118 0 0 1 .4122-.4121zm-5.1095 1.4863a.1498.2995 17.23 0 1 .0293.004.1498.2995 17.23 0 1 .0547.33.1498.2995 17.23 0 1-.2325.2422.1498.2995 17.23 0 1-.0527-.33.1498.2995 17.23 0 1 .2012-.2462zm.6719.0215a.2995.1498 75.54 0 1 .205.254.2995.1498 75.54 0 1-.0703.328.2995.1498 75.54 0 1-.2207-.2519.2995.1498 75.54 0 1 .0703-.3281.2995.1498 75.54 0 1 .0157-.002zm-.3164.4766s.0358.226.1855.3008c.1498.0749.8614-.1504.8614-.1504-.337.262-.9727.263-.9727.338v.373c0 .4079.0263 1.4614-.0313 1.6856.8238.0045 2.09 1.1255 2.09 2.508v.0741c-.0375-1.3478-1.6091-2.4337-2.0958-2.4337-.4867 0-2.0603 1.0485-2.0978 2.4337v-.0742c0-1.3626 1.2326-2.47 2.0567-2.506-.0704-.5517-.0722-1.1372-.0722-1.6875v-.373c-.2145-.0954-.4322-.1714-.6563-.2364.1846.0326.371.0488.545.0488.1497-.0749.1875-.3008.1875-.3008zm-3.0412 1.3477a.1498.1498 0 0 1 .0078 0 .1498.1498 0 0 1 .1504.1504.1498.1498 0 0 1-.1504.1504.1498.1498 0 0 1-.1504-.1504.1498.1498 0 0 1 .1426-.1504zm1.1231 0a.1498.1498 0 0 1 .0078 0 .1498.1498 0 0 1 .1504.1504.1498.1498 0 0 1-.1504.1504.1498.1498 0 0 1-.1504-.1504.1498.1498 0 0 1 .1426-.1504zm3.67 0a.1498.1498 0 0 1 .0079 0 .1498.1498 0 0 1 .1504.1504.1498.1498 0 0 1-.1504.1504.1498.1498 0 0 1-.1504-.1504.1498.1498 0 0 1 .1426-.1504zm1.1232 0a.1498.1498 0 0 1 .0078 0 .1498.1498 0 0 1 .1504.1504.1498.1498 0 0 1-.1504.1504.1498.1498 0 0 1-.1504-.1504.1498.1498 0 0 1 .1426-.1504zm-5.6526.8985a.1498.1498 0 0 1 .0078 0 .1498.1498 0 0 1 .1484.1504.1498.1498 0 0 1-.1484.1504.1498.1498 0 0 1-.1504-.1504.1498.1498 0 0 1 .1426-.1504zm5.3908 0a.1498.1498 0 0 1 .006 0 .1498.1498 0 0 1 .1503.1504.1498.1498 0 0 1-.1504.1504.1498.1498 0 0 1-.1484-.1504.1498.1498 0 0 1 .1425-.1504Z"/></svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Roundcube icon</title><path d="M19.9 8.6c0 1.2-.3 2.3-.7 3.3l.7-.4 3.4-2L20.6 8c-.3-4.5-4-8-8.6-8S3.7 3.5 3.4 8L.7 9.6l3.1 1.8.9.5c-.5-1-.7-2.1-.7-3.3C4 4.2 7.6.7 11.9.7c4.5 0 8 3.5 8 7.9zM.1 17.3L11.7 24v-7.4L.1 9.9zm12.2-.7V24l11.6-6.7V9.9z"/></svg>
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Roundcube icon</title><path d="M12.002.072a8.302 8.302 0 0 0-8.266 7.512L.498 9.454l4.682 2.704A7.8 7.8 0 0 1 12.002.572a7.802 7.802 0 0 1 6.824 11.582l4.676-2.7-3.236-1.87A8.302 8.302 0 0 0 12.002.072zM0 9.742v7.399l11.75 6.787v-7.399L0 9.742zm24 0l-5.777 3.338-5.248 3.031h-.002l-.108.063-.615.355v7.399L24 17.14V9.744z"/></svg>

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 408 B

View File

@ -1 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Svelte icon</title><path d="M20.703 3.17c-2.217-3.193-6.63-4.129-9.804-2.095l-5.594 3.56A6.357 6.357 0 002.42 8.926a6.659 6.659 0 00.671 4.332 6.14 6.14 0 00-.956 2.4 6.843 6.843 0 001.16 5.166c2.237 3.193 6.63 4.13 9.803 2.115l5.593-3.56a6.357 6.357 0 002.888-4.29 6.659 6.659 0 00-.67-4.332 6.14 6.14 0 00.955-2.4c.325-1.83-.081-3.702-1.16-5.187M10.35 21.13a4.433 4.433 0 01-4.759-1.77 4.119 4.119 0 01-.712-3.112c.04-.183.082-.346.122-.53l.102-.324.285.203a7.419 7.419 0 002.196 1.099l.204.06-.02.204c-.021.285.06.59.223.834.325.468.895.69 1.444.549a1.73 1.73 0 00.346-.142l5.573-3.56c.284-.183.468-.447.529-.773a1.262 1.262 0 00-.204-.935 1.335 1.335 0 00-1.444-.53 1.73 1.73 0 00-.346.143l-2.115 1.343a3.783 3.783 0 01-1.14.488 4.433 4.433 0 01-4.759-1.77 4.108 4.108 0 01-.69-3.111 3.85 3.85 0 011.748-2.583l5.573-3.56a4.427 4.427 0 011.14-.508 4.433 4.433 0 014.759 1.77 4.12 4.12 0 01.71 3.111 4.71 4.71 0 01-.141.529l-.102.325-.284-.203a7.419 7.419 0 00-2.197-1.098l-.203-.061.02-.204c.02-.284-.061-.59-.224-.834a1.335 1.335 0 00-1.444-.528 1.76 1.76 0 00-.346.142l-5.572 3.58a1.153 1.153 0 00-.53.772c-.06.326.021.672.204.936.326.468.895.67 1.444.529a1.76 1.76 0 00.346-.143l2.136-1.362a4.427 4.427 0 011.139-.51 4.433 4.433 0 014.759 1.77c.65.896.895 2.014.712 3.113a3.85 3.85 0 01-1.75 2.583L11.51 20.62a4.9 4.9 0 01-1.16.508"/></svg>
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Svelte icon</title><path d="M10.354 21.125a4.44 4.44 0 0 1-4.765-1.767 4.109 4.109 0 0 1-.703-3.107 3.898 3.898 0 0 1 .134-.522l.105-.321.287.21a7.21 7.21 0 0 0 2.186 1.092l.208.063-.02.208a1.253 1.253 0 0 0 .226.83 1.337 1.337 0 0 0 1.435.533 1.231 1.231 0 0 0 .343-.15l5.59-3.562a1.164 1.164 0 0 0 .524-.778 1.242 1.242 0 0 0-.211-.937 1.338 1.338 0 0 0-1.435-.533 1.23 1.23 0 0 0-.343.15l-2.133 1.36a4.078 4.078 0 0 1-1.135.499 4.44 4.44 0 0 1-4.765-1.766 4.108 4.108 0 0 1-.702-3.108 3.855 3.855 0 0 1 1.742-2.582l5.589-3.563a4.072 4.072 0 0 1 1.135-.499 4.44 4.44 0 0 1 4.765 1.767 4.109 4.109 0 0 1 .703 3.107 3.943 3.943 0 0 1-.134.522l-.105.321-.286-.21a7.204 7.204 0 0 0-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 0 0-.226-.831 1.337 1.337 0 0 0-1.435-.532 1.231 1.231 0 0 0-.343.15L8.62 9.368a1.162 1.162 0 0 0-.524.778 1.24 1.24 0 0 0 .211.937 1.338 1.338 0 0 0 1.435.533 1.235 1.235 0 0 0 .344-.151l2.132-1.36a4.067 4.067 0 0 1 1.135-.498 4.44 4.44 0 0 1 4.765 1.766 4.108 4.108 0 0 1 .702 3.108 3.857 3.857 0 0 1-1.742 2.583l-5.589 3.562a4.072 4.072 0 0 1-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 0 0-2.896 4.295 6.753 6.753 0 0 0 .666 4.336 6.43 6.43 0 0 0-.96 2.396 6.833 6.833 0 0 0 1.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 0 0 2.896-4.295 6.756 6.756 0 0 0-.665-4.336 6.429 6.429 0 0 0 .958-2.396 6.831 6.831 0 0 0-1.167-5.168Z"/></svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

1
icons/textpattern.svg Normal file
View File

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Textpattern icon</title><path d="m3.638 10.8h-.559s-.918-.776-1.872-1.692-1.207-1.387-1.207-1.387v-.559l7.162-7.162h.559s.744.61 1.631 1.448 1.448 1.63 1.448 1.63v.559l-2.193 2.193 4.397 4.117s2.431-2.431 3.272-3.271 1.736-2.719 1.736-2.719l2.346-2.346.61-.413 3.032 3.033-.414.611-2.344 2.344s-1.606.684-2.718 1.737-3.34 3.34-3.34 3.34 1.933 2.146 4.057 4.27c2.146 2.146 4.484 4.271 4.651 4.426.334.309-.347 1.373-.906 2.027s-.857.697-1.247.901c-.39.205-.836-.051-.836-.051s-2.056-2.261-4.082-4.304c-1.975-1.991-4.559-4.349-4.559-4.349s-6.646 6.645-7.079 7.078c-.433.434-.597 1.089-.597 1.089l-.649.65s-.701-.396-1.553-1.255-1.182-1.487-1.182-1.487l.646-.646s.598-.084 1.088-.597 7.01-7.009 7.01-7.009l-4.119-4.398zm17.267 13.04c-.02-.019-.034-.033 0 0zm-3.456-15.084.453-.453c.86-.86 3.194-1.392 3.194-1.392l2.26-2.26.258-.381-2.682-2.682-.381.258-2.261 2.261s-.942 1.925-1.802 2.784l-.423.423-.03.03-12.887 12.887c-.491.492-1.147.655-1.147.655l-.409.41s.551.787 1.004 1.24c.453.454.765.647.765.647l.462-.475s.246-.573.737-1.065zm-4.656 1.406-3.798-3.577s-.626.197-1.088.815-.488 1.125-.066 1.547c.423.422 3.085 3.082 3.085 3.082zm2.642 2.818s-.714.181-1.097.746-.359.927.052 1.339c.412.412 2.378 2.199 3.888 3.718s3.746 3.864 4.004 4.04c.26.177.26.177.26.177s.389-.303.668-.702.627-.981.462-1.132c-.166-.152-1.828-1.669-4.027-3.81s-4.21-4.376-4.21-4.376zm-15.136-5.693v.339s.369.523 1.36 1.514 1.514 1.36 1.514 1.36h.339l-.091-.257s-.766-.399-1.615-1.249c-.85-.85-1.25-1.616-1.25-1.616s2.058-2.009 3.442-3.393c1.385-1.385 3.379-3.428 3.379-3.428s.737.429 1.587 1.279 1.279 1.586 1.279 1.586l.257.091v-.339s-.369-.523-1.36-1.514-1.514-1.36-1.514-1.36h-.339z"/></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1 @@
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Windows Terminal icon</title><path d="M8.165 6V3h7.665v3H8.165zm-.5-3H1c-.55 0-1 .45-1 1v2h7.665V3zM23 3h-6.67v3H24V4c0-.55-.45-1-1-1zM0 6.5h24V20c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V6.5zM11.5 18c0 .3.2.5.5.5h8c.3 0 .5-.2.5-.5v-1.5c0-.3-.2-.5-.5-.5h-8c-.3 0-.5.2-.5.5V18zm-5.2-4.55l-3.1 3.1c-.25.25-.25.6 0 .8l.9.9c.25.25.6.25.8 0l4.4-4.4a.52.52 0 0 0 0-.8l-4.4-4.4c-.2-.2-.6-.2-.8 0l-.9.9c-.25.2-.25.55 0 .8l3.1 3.1z"/></svg>

After

Width:  |  Height:  |  Size: 503 B

8
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "simple-icons",
"version": "4.10.0",
"version": "4.11.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -5786,9 +5786,9 @@
}
},
"uglify-js": {
"version": "3.12.6",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.6.tgz",
"integrity": "sha512-aqWHe3DfQmZUDGWBbabZ2eQnJlQd1fKlMUu7gV+MiTuDzdgDw31bI3wA2jLLsV/hNcDP26IfyEgSVoft5+0SVw==",
"version": "3.12.7",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.7.tgz",
"integrity": "sha512-SIZhkoh+U/wjW+BHGhVwE9nt8tWJspncloBcFapkpGRwNPqcH8pzX36BXe3TPBjzHWPMUZotpCigak/udWNr1Q==",
"dev": true
},
"underscore": {

View File

@ -1,6 +1,6 @@
{
"name": "simple-icons",
"version": "4.10.0",
"version": "4.11.0",
"description": "SVG icons for popular brands https://simpleicons.org",
"homepage": "https://www.simpleicons.org",
"keywords": [
@ -27,7 +27,7 @@
"svglint": "1.0.7",
"svgo": "1.3.2",
"svgpath": "2.3.0",
"uglify-js": "3.12.6"
"uglify-js": "3.12.7"
},
"scripts": {
"build": "node scripts/build-package.js",

View File

@ -2,29 +2,30 @@
/**
* @fileoverview
* Compiles our icons into static .js files that can be imported in the browser
* and are tree-shakeable.
* The static .js files go in icons/{filename}.js.
* Also generates an index.js that exports all icons by title, but is not tree-shakeable
* and are tree-shakeable. The static .js files go in icons/{filename}.js. Also
* generates an index.js that exports all icons by title, but is not
* tree-shakeable
*/
const fs = require("fs");
const path = require("path");
const util = require("util");
const minify = require("uglify-js").minify;
const UTF8 = "utf8";
const dataFile = "../_data/simple-icons.json";
const indexFile = `${__dirname}/../index.js`;
const iconsDir = `${__dirname}/../icons`;
const dataFile = path.resolve(__dirname, "..", "_data", "simple-icons.json");
const indexFile = path.resolve(__dirname, "..", "index.js");
const iconsDir = path.resolve(__dirname, "..", "icons");
const indexTemplateFile = `${__dirname}/templates/index.js`;
const iconObjectTemplateFile = `${__dirname}/templates/icon-object.js`;
const indexTemplateFile = path.resolve(__dirname, "templates", "index.js");
const iconObjectTemplateFile = path.resolve(__dirname, "templates", "icon-object.js");
const indexTemplate = fs.readFileSync(indexTemplateFile, UTF8);
const iconObjectTemplate = fs.readFileSync(iconObjectTemplateFile, UTF8);
const data = require(dataFile);
const { titleToFilename } = require("./utils");
const { titleToSlug } = require("./utils.js");
// Local helper functions
function escape(value) {
@ -43,32 +44,30 @@ function iconToObject(icon) {
escape(icon.hex)
);
}
function minifyAndWrite(filepath, rawJavaScript) {
const { error, code } = minify(rawJavaScript);
if (error) {
console.error(error);
process.exit(1);
} else {
fs.writeFileSync(filepath, code);
}
}
// 'main'
const icons = [];
data.icons.forEach(icon => {
const filename = titleToFilename(icon.title);
icon.svg = fs.readFileSync(`${iconsDir}/${filename}.svg`, UTF8).replace(/\r?\n/, '');
icon.slug = filename;
icons.push(icon);
// write the static .js file for the icon
const { error, code } = minify(`module.exports=${iconToObject(icon)};`);
if (error) {
console.error(error);
process.exit(1);
} else {
fs.writeFileSync(`${iconsDir}/${filename}.js`, code);
}
const filename = titleToSlug(icon.title);
const svgFilepath = path.resolve(iconsDir, `${filename}.svg`);
icon.svg = fs.readFileSync(svgFilepath, UTF8).replace(/\r?\n/, '');
icon.slug = filename;
icons.push(icon);
// write the static .js file for the icon
const jsFilepath = path.resolve(iconsDir, `${filename}.js`);
minifyAndWrite(jsFilepath, `module.exports=${iconToObject(icon)};`);
});
// write our generic index.js
const rawIndexJs = util.format(indexTemplate, icons.map(iconToKeyValue).join(','));
const { error, code } = minify(rawIndexJs);
if (error) {
console.error(error);
process.exit(1);
} else {
fs.writeFileSync(indexFile, code);
}
minifyAndWrite(indexFile, rawIndexJs);

View File

@ -1,22 +1,19 @@
#!/usr/bin/env node
/**
* @fileoverview
* Takes a brand name as argument and outputs the corresonding filename to
* standard output.
* Script that takes a brand name as argument and outputs the corresponding
* icon SVG filename to standard output.
*/
const utils = require('./utils.js');
const utils = require("./utils.js");
if (process.argv.length < 3) {
console.error("Provide a brand name as argument")
console.error("Provide a brand name as argument");
process.exit(1);
} else {
let brandName = "";
for (let i = 2; i < process.argv.length; i++) {
brandName += ` ${process.argv[i]}`;
}
const brandName = process.argv.slice(3)
.reduce((acc, arg) => `${acc} ${arg}`, process.argv[2]);
brandName = brandName.substring(1);
const filename = utils.titleToFilename(brandName);
console.log(`For '${brandName}' use the filename '${filename}.svg'`);
const filename = utils.titleToSlug(brandName);
console.log(`For '${brandName}' use the file 'icons/${filename}.svg'`);
}

View File

@ -1,6 +1,8 @@
#!/usr/bin/env node
/**
* @fileoverview Lints for the package that can't be implemented in the existing linters (e.g. jsonlint/svglint)
* @fileoverview
* Linters for the package that can't easily be implemented in the existing
* linters (e.g. jsonlint/svglint).
*/
const fs = require("fs");
@ -8,12 +10,13 @@ const path = require("path");
const { diffLinesUnified } = require("jest-diff");
const simpleIconsData = require("../_data/simple-icons.json");
const simpleIconsDataFile = path.resolve(
__dirname, "..", "_data", "simple-icons.json");
const UTF8 = "utf8";
const dataFile = path.resolve( __dirname, "..", "_data", "simple-icons.json");
const data = require(dataFile);
/**
* Contains our tests so they can be isolated from eachother; I don't think each test is worth its own file
* Contains our tests so they can be isolated from each other.
* @type {{[k:string]: () => (string|undefined)}}
*/
const TESTS = {
@ -29,38 +32,38 @@ const TESTS = {
return invalidEntries;
};
const invalids = simpleIconsData.icons.reduce(collector, []);
const invalids = data.icons.reduce(collector, []);
if (invalids.length) {
return `Some icons aren't in alphabetical order:
${invalids.map(icon => icon.title).join(", ")}`;
}
},
/* Check the prettification of the data file */
/* Check the formatting of the data file */
prettified: function() {
const simpleIconsDataString = fs.readFileSync(
simpleIconsDataFile, "utf8").replace(/\r\n/g, '\n');
const simpleIconsDataPretty = `${JSON.stringify(simpleIconsData, null, " ")}\n`;
if (simpleIconsDataString !== simpleIconsDataPretty) {
const dataDiff = diffLinesUnified(simpleIconsDataString.split("\n"),
simpleIconsDataPretty.split("\n"),
{
expand: false,
omitAnnotationLines: true
});
return `Data file is not prettified:\n\n${dataDiff}`;
const dataString = fs.readFileSync(dataFile, UTF8).replace(/\r\n/g, '\n');
const dataPretty = `${JSON.stringify(data, null, " ")}\n`;
if (dataString !== dataPretty) {
const dataDiff = diffLinesUnified(
dataString.split("\n"),
dataPretty.split("\n"),
{
expand: false,
omitAnnotationLines: true
},
);
return `Data file is formatted incorrectly:\n\n${dataDiff}`;
}
}
};
// execute all tests and log potential errors
// execute all tests and log all errors
const errors = Object.keys(TESTS)
.map(k => TESTS[k]())
.filter(Boolean);
if (errors.length) {
errors.forEach(error => {
console.error(`\u001b[31m${error}\u001b[0m`);
});
if (errors.length > 0) {
errors.forEach(error => console.error(`\u001b[31m${error}\u001b[0m`));
process.exit(1);
}

View File

@ -1,38 +1,43 @@
module.exports = {
/**
* Converts a brand title into a filename (not a full path)
* @param {String} title The title to convert
*/
titleToFilename: title => (
title.toLowerCase()
.replace(/\+/g, "plus")
.replace(/^\./, "dot-")
.replace(/\.$/, "-dot")
.replace(/\./g, "-dot-")
.replace(/^&/, "and-")
.replace(/&$/, "-and")
.replace(/&/g, "-and-")
.replace(/đ/g, "d")
.replace(/ħ/g, "h")
.replace(/ı/g, "i")
.replace(/ĸ/g, "k")
.replace(/ŀ/g, "l")
.replace(/ł/g, "l")
.replace(/ß/g, "ss")
.replace(/ŧ/g, "t")
.normalize("NFD")
.replace(/[\u0300-\u036f]/g, "")
.replace(/[^a-z0-9_\-]/g, "")
),
/**
* @fileoverview
* Some common utilities for scripts.
*/
/**
* Converts a brand title in HTML friendly format into a brand title (as it
* is seen in simple-icons.json)
* @param {String} htmlFriendlyTitle The title to convert
*/
htmlFriendlyToTitle: htmlFriendlyTitle => (
htmlFriendlyTitle
.replace(/&apos;/g, "")
.replace(/&amp;/g, "&")
)
module.exports = {
/**
* Converts a brand title into a slug/filename.
* @param {String} title The title to convert
*/
titleToSlug: title => (
title.toLowerCase()
.replace(/\+/g, "plus")
.replace(/^\./, "dot-")
.replace(/\.$/, "-dot")
.replace(/\./g, "-dot-")
.replace(/^&/, "and-")
.replace(/&$/, "-and")
.replace(/&/g, "-and-")
.replace(/đ/g, "d")
.replace(/ħ/g, "h")
.replace(/ı/g, "i")
.replace(/ĸ/g, "k")
.replace(/ŀ/g, "l")
.replace(/ł/g, "l")
.replace(/ß/g, "ss")
.replace(/ŧ/g, "t")
.normalize("NFD")
.replace(/[\u0300-\u036f]/g, "")
.replace(/[^a-z0-9_\-]/g, "")
),
/**
* Converts a brand title in HTML/SVG friendly format into a brand title (as
* it is seen in simple-icons.json)
* @param {String} htmlFriendlyTitle The title to convert
*/
htmlFriendlyToTitle: htmlFriendlyTitle => (
htmlFriendlyTitle
.replace(/&apos;/g, "")
.replace(/&amp;/g, "&")
),
}

View File

@ -1,8 +1,8 @@
const { icons } = require('../_data/simple-icons.json');
const { titleToFilename } = require('../scripts/utils.js');
const { titleToSlug } = require('../scripts/utils.js');
icons.forEach(icon => {
const filename = titleToFilename(icon.title);
const filename = titleToSlug(icon.title);
const subject = require(`../icons/${filename}.js`);
test(`${icon.title} has a "title"`, () => {

View File

@ -1,6 +1,6 @@
const { icons } = require('../_data/simple-icons.json');
const simpleIcons = require('../index.js');
const { titleToFilename } = require("../scripts/utils.js");
const { titleToSlug } = require("../scripts/utils.js");
icons.forEach(icon => {
const subject = simpleIcons[icon.title];
@ -38,7 +38,7 @@ icons.forEach(icon => {
});
test(`${icon.title} can be found by it's slug`, () => {
const name = titleToFilename(icon.title);
const name = titleToSlug(icon.title);
const found = simpleIcons.get(name);
expect(found).toBeDefined();
expect(found.title).toEqual(icon.title);