From c7241d6bee2a9d944fe0d21f9bdf5c591bbbfac5 Mon Sep 17 00:00:00 2001 From: Maxime Moreillon Date: Mon, 19 Sep 2022 13:10:52 +0900 Subject: [PATCH 01/31] Add Adminer icon (#7746) --- _data/simple-icons.json | 5 +++++ icons/adminer.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/adminer.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 304142bcdaa5..816843007176 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -160,6 +160,11 @@ "hex": "000000", "source": "https://www.adidas.com" }, + { + "title": "Adminer", + "hex": "34567C", + "source": "https://www.adminer.org/" + }, { "title": "Adobe", "hex": "FF0000", diff --git a/icons/adminer.svg b/icons/adminer.svg new file mode 100644 index 000000000000..915be0082876 --- /dev/null +++ b/icons/adminer.svg @@ -0,0 +1 @@ +Adminer \ No newline at end of file From cc2fabf0aacd7fefaf31fc768ad0d229e1df978e Mon Sep 17 00:00:00 2001 From: Adam Rusted Date: Mon, 19 Sep 2022 10:48:21 +0100 Subject: [PATCH 02/31] Add CafePress icon (#7817) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/cafepress.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/cafepress.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 816843007176..b7fff3976437 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -1807,6 +1807,11 @@ "hex": "7ED321", "source": "https://cachethq.io/press" }, + { + "title": "CafePress", + "hex": "58A616", + "source": "https://en.wikipedia.org/wiki/CafePress#/media/File:CafePress_logo.svg" + }, { "title": "Caffeine", "hex": "0000FF", diff --git a/icons/cafepress.svg b/icons/cafepress.svg new file mode 100644 index 000000000000..97f8ca573d6b --- /dev/null +++ b/icons/cafepress.svg @@ -0,0 +1 @@ +CafePress \ No newline at end of file From e96ccd3fafb1f850b7f589b81fdf0a19f9f5423d Mon Sep 17 00:00:00 2001 From: Adam Rusted Date: Mon, 19 Sep 2022 11:07:24 +0100 Subject: [PATCH 03/31] Add Tidyverse icon (#7816) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/tidyverse.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/tidyverse.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index b7fff3976437..f6d4467f9ad8 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -11209,6 +11209,11 @@ "hex": "4050FB", "source": "https://www.tide.co/newsroom/" }, + { + "title": "Tidyverse", + "hex": "1A162D", + "source": "https://github.com/rstudio/hex-stickers/blob/69528093ef59f541e5a4798dbcb00e60267e8870/SVG/tidyverse.svg" + }, { "title": "TietoEVRY", "hex": "063752", diff --git a/icons/tidyverse.svg b/icons/tidyverse.svg new file mode 100644 index 000000000000..1c389d036042 --- /dev/null +++ b/icons/tidyverse.svg @@ -0,0 +1 @@ +Tidyverse \ No newline at end of file From 95232d3841cd609c4d5eb28efbdf39e0316f7159 Mon Sep 17 00:00:00 2001 From: Adam Rusted Date: Mon, 19 Sep 2022 11:14:20 +0100 Subject: [PATCH 04/31] Add ReSharper icon (#7814) Co-authored-by: LitoMore --- _data/simple-icons.json | 6 ++++++ icons/resharper.svg | 1 + 2 files changed, 7 insertions(+) create mode 100644 icons/resharper.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index f6d4467f9ad8..f4dc6dacab23 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -9335,6 +9335,12 @@ "hex": "00CCBB", "source": "https://c5.rgstatic.net/m/428059296771819/images/favicon/favicon.svg" }, + { + "title": "ReSharper", + "hex": "000000", + "source": "https://www.jetbrains.com/company/brand/logos/", + "guidelines": "https://www.jetbrains.com/company/brand/" + }, { "title": "Resurrection Remix OS", "hex": "000000", diff --git a/icons/resharper.svg b/icons/resharper.svg new file mode 100644 index 000000000000..d3ba5cfc3ae8 --- /dev/null +++ b/icons/resharper.svg @@ -0,0 +1 @@ +ReSharper \ No newline at end of file From 3a00110ff762aa69cec1d95a9a4a2d282dfe8ae2 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Mon, 19 Sep 2022 16:24:50 +0300 Subject: [PATCH 05/31] Add Relay icon (#7825) --- _data/simple-icons.json | 5 +++++ icons/relay.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/relay.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index f4dc6dacab23..40f193798050 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -9269,6 +9269,11 @@ "hex": "E41D1B", "source": "https://www.reebok.com/us" }, + { + "title": "Relay", + "hex": "F26B00", + "source": "https://relay.dev/" + }, { "title": "Reliance Industries Limited", "hex": "D1AB66", diff --git a/icons/relay.svg b/icons/relay.svg new file mode 100644 index 000000000000..d188cff4512d --- /dev/null +++ b/icons/relay.svg @@ -0,0 +1 @@ +Relay \ No newline at end of file From 83c672f70d54b31a478794de8a546acc293f0393 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Mon, 19 Sep 2022 16:31:17 +0300 Subject: [PATCH 06/31] Add Vitest icon (#7824) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/vitest.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/vitest.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 40f193798050..cb60a67cb9ab 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -11920,6 +11920,11 @@ "hex": "F16728", "source": "https://cncf-branding.netlify.app/projects/vitess/" }, + { + "title": "Vitest", + "hex": "6E9F18", + "source": "https://vitest.dev/" + }, { "title": "Vivaldi", "hex": "EF3939", diff --git a/icons/vitest.svg b/icons/vitest.svg new file mode 100644 index 000000000000..6462d399df0d --- /dev/null +++ b/icons/vitest.svg @@ -0,0 +1 @@ +Vitest \ No newline at end of file From 10eda599542592e80b9e46f7c2c4e6eeb2e595ee Mon Sep 17 00:00:00 2001 From: Adam Rusted Date: Mon, 19 Sep 2022 14:43:04 +0100 Subject: [PATCH 07/31] Add JUKE icon (#7811) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/juke.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/juke.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index cb60a67cb9ab..d0b7e01d2bb0 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -5642,6 +5642,11 @@ "hex": "F7DF1E", "source": "https://cssinjs.org/" }, + { + "title": "JUKE", + "hex": "6CD74A", + "source": "https://juke.nl/" + }, { "title": "Julia", "hex": "9558B2", diff --git a/icons/juke.svg b/icons/juke.svg new file mode 100644 index 000000000000..5de22de44238 --- /dev/null +++ b/icons/juke.svg @@ -0,0 +1 @@ +JUKE \ No newline at end of file From 85a14fa1df9735c7ace07c80309216b9a1a5d948 Mon Sep 17 00:00:00 2001 From: Adam Rusted Date: Mon, 19 Sep 2022 15:16:35 +0100 Subject: [PATCH 08/31] Add Game Developer icon (#7806) Co-authored-by: LitoMore --- _data/simple-icons.json | 10 ++++++++++ icons/gamedeveloper.svg | 1 + 2 files changed, 11 insertions(+) create mode 100644 icons/gamedeveloper.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index d0b7e01d2bb0..477a3fed5819 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -4052,6 +4052,16 @@ "hex": "000000", "source": "https://upload.wikimedia.org/wikipedia/commons/4/41/Game_and_watch_logo.svg" }, + { + "title": "Game Developer", + "hex": "E60012", + "source": "https://www.gamedeveloper.com/", + "aliases": { + "aka": [ + "Gamasutra" + ] + } + }, { "title": "Game Jolt", "hex": "CCFF00", diff --git a/icons/gamedeveloper.svg b/icons/gamedeveloper.svg new file mode 100644 index 000000000000..26624680267c --- /dev/null +++ b/icons/gamedeveloper.svg @@ -0,0 +1 @@ +Game Developer \ No newline at end of file From bb21fdf64ab0db89898e8a36f6e0b57fbac8eac7 Mon Sep 17 00:00:00 2001 From: Adam Rusted Date: Mon, 19 Sep 2022 15:25:45 +0100 Subject: [PATCH 09/31] Add Interaction Design Foundation icon (#7809) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/interactiondesignfoundation.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/interactiondesignfoundation.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 477a3fed5819..e4126df08697 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -5333,6 +5333,11 @@ "source": "https://www.jetbrains.com/idea/", "guidelines": "https://www.jetbrains.com/company/brand/" }, + { + "title": "Interaction Design Foundation", + "hex": "2B2B2B", + "source": "https://www.interaction-design.org/" + }, { "title": "InteractJS", "hex": "2599ED", diff --git a/icons/interactiondesignfoundation.svg b/icons/interactiondesignfoundation.svg new file mode 100644 index 000000000000..c708c20ef4f2 --- /dev/null +++ b/icons/interactiondesignfoundation.svg @@ -0,0 +1 @@ +Interaction Design Foundation \ No newline at end of file From e41901088d0d9ec8ffea144cf5d18e51262ae5d4 Mon Sep 17 00:00:00 2001 From: Adam Rusted Date: Mon, 19 Sep 2022 15:40:33 +0100 Subject: [PATCH 10/31] Update Plex icon (#7799) Co-authored-by: LitoMore --- _data/simple-icons.json | 2 +- icons/plex.svg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_data/simple-icons.json b/_data/simple-icons.json index e4126df08697..77bb706e1d02 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -8427,7 +8427,7 @@ }, { "title": "Plex", - "hex": "E5A00D", + "hex": "EBAF00", "source": "https://brand.plex.tv/", "guidelines": "https://brand.plex.tv/" }, diff --git a/icons/plex.svg b/icons/plex.svg index 8e74c5e71dae..87379e14fd1a 100644 --- a/icons/plex.svg +++ b/icons/plex.svg @@ -1 +1 @@ -Plex \ No newline at end of file +Plex \ No newline at end of file From 24cb5609851a5c1385e709046eff3ce96d13f57e Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 20 Sep 2022 11:12:54 +0300 Subject: [PATCH 11/31] Add VSCodium icon (#7826) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/vscodium.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/vscodium.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 77bb706e1d02..6647bc624092 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -12006,6 +12006,11 @@ "hex": "000000", "source": "https://vscopress.co/media-kit" }, + { + "title": "VSCodium", + "hex": "2F80ED", + "source": "https://vscodium.com" + }, { "title": "VTEX", "hex": "ED125F", diff --git a/icons/vscodium.svg b/icons/vscodium.svg new file mode 100644 index 000000000000..6649f32adea8 --- /dev/null +++ b/icons/vscodium.svg @@ -0,0 +1 @@ +VSCodium \ No newline at end of file From 7430036855283622a0effa98bd46e6618b0caffc Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 11:07:03 +0800 Subject: [PATCH 12/31] Add Amazon Games icon (#7832) --- _data/simple-icons.json | 5 +++++ icons/amazongames.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/amazongames.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 6647bc624092..e03f5c9f9322 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -585,6 +585,11 @@ "hex": "FC4C02", "source": "https://www.amazon.com/gp/help/customer/display.html?nodeId=201348270" }, + { + "title": "Amazon Games", + "hex": "FF9900", + "source": "https://www.amazongames.com" + }, { "title": "Amazon Lumberyard", "hex": "66459B", diff --git a/icons/amazongames.svg b/icons/amazongames.svg new file mode 100644 index 000000000000..950b408b05c2 --- /dev/null +++ b/icons/amazongames.svg @@ -0,0 +1 @@ +Amazon Games \ No newline at end of file From 89a5fce5c1b80b4e781959faaa5b56b51b639f7f Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 11:08:21 +0800 Subject: [PATCH 13/31] Add Taichi Lang icon (#7828) --- _data/simple-icons.json | 5 +++++ icons/taichilang.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/taichilang.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index e03f5c9f9322..2924aec77309 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -10940,6 +10940,11 @@ "hex": "FFA900", "source": "https://www.tado.com/gb-en/press-assets" }, + { + "title": "Taichi Lang", + "hex": "000000", + "source": "https://docs.taichi-lang.org/blog" + }, { "title": "Tails", "hex": "56347C", diff --git a/icons/taichilang.svg b/icons/taichilang.svg new file mode 100644 index 000000000000..da69a2bd4a9b --- /dev/null +++ b/icons/taichilang.svg @@ -0,0 +1 @@ +Taichi Lang \ No newline at end of file From 52c38711b6db0afb20ad669d4a794502328acdb8 Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 11:12:14 +0800 Subject: [PATCH 14/31] Add Taichi Graphics icon (#7829) --- _data/simple-icons.json | 5 +++++ icons/taichigraphics.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/taichigraphics.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 2924aec77309..7583f4b63405 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -10940,6 +10940,11 @@ "hex": "FFA900", "source": "https://www.tado.com/gb-en/press-assets" }, + { + "title": "Taichi Graphics", + "hex": "000000", + "source": "https://taichi.graphics" + }, { "title": "Taichi Lang", "hex": "000000", diff --git a/icons/taichigraphics.svg b/icons/taichigraphics.svg new file mode 100644 index 000000000000..2cd9224892b9 --- /dev/null +++ b/icons/taichigraphics.svg @@ -0,0 +1 @@ +Taichi Graphics \ No newline at end of file From ddd029047a35bf29b6a2cbd2006cc688b60995c0 Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 11:14:09 +0800 Subject: [PATCH 15/31] Add Tamiya icon (#7755) --- _data/simple-icons.json | 5 +++++ icons/tamiya.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/tamiya.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 7583f4b63405..71d5ae8c2222 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -10971,6 +10971,11 @@ "hex": "FFFFFF", "source": "https://www.talenthouse.com/" }, + { + "title": "Tamiya", + "hex": "000000", + "source": "https://commons.wikimedia.org/wiki/File:TAMIYA_Logo.svg" + }, { "title": "Tampermonkey", "hex": "00485B", diff --git a/icons/tamiya.svg b/icons/tamiya.svg new file mode 100644 index 000000000000..d62ce95c51fc --- /dev/null +++ b/icons/tamiya.svg @@ -0,0 +1 @@ +Tamiya \ No newline at end of file From 359c0d0c2de416aa9c6b9fbd1e9b6372f649f609 Mon Sep 17 00:00:00 2001 From: Wu Tingfeng Date: Wed, 21 Sep 2022 11:28:15 +0800 Subject: [PATCH 16/31] Add Warp icon (#7309) Co-authored-by: LitoMore Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/warp.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/warp.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 71d5ae8c2222..aa6d0dab4e72 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -12112,6 +12112,11 @@ "hex": "004DB4", "source": "https://www.warnerbros.com/" }, + { + "title": "Warp", + "hex": "01A4FF", + "source": "https://warp.dev" + }, { "title": "wasmCloud", "hex": "00BC8E", diff --git a/icons/warp.svg b/icons/warp.svg new file mode 100644 index 000000000000..b825120839ff --- /dev/null +++ b/icons/warp.svg @@ -0,0 +1 @@ +Warp \ No newline at end of file From 7a9b805959ba0fb6eb4305638ff1982141d857a0 Mon Sep 17 00:00:00 2001 From: Wu Tingfeng Date: Wed, 21 Sep 2022 11:36:55 +0800 Subject: [PATCH 17/31] Add ZincSearch icon (#7837) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/zincsearch.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/zincsearch.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index aa6d0dab4e72..56037d797f37 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -12794,6 +12794,11 @@ "hex": "006AFF", "source": "https://www.zillow.com/" }, + { + "title": "ZincSearch", + "hex": "5BA37F", + "source": "https://zincsearch.com/" + }, { "title": "Zingat", "hex": "009CFB", diff --git a/icons/zincsearch.svg b/icons/zincsearch.svg new file mode 100644 index 000000000000..e85b5e227b70 --- /dev/null +++ b/icons/zincsearch.svg @@ -0,0 +1 @@ +ZincSearch \ No newline at end of file From 8e706be7d5ac91d2b08f055ea61867a1b1ab7358 Mon Sep 17 00:00:00 2001 From: Adam Rusted Date: Wed, 21 Sep 2022 05:15:38 +0100 Subject: [PATCH 18/31] Add Sonar icon (#7800) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/sonar.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/sonar.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 56037d797f37..c64d2ddf8385 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -10277,6 +10277,11 @@ "hex": "5294E2", "source": "https://getsol.us/branding/" }, + { + "title": "Sonar", + "hex": "FD3456", + "source": "https://www.sonarsource.com/" + }, { "title": "SonarCloud", "hex": "F3702A", diff --git a/icons/sonar.svg b/icons/sonar.svg new file mode 100644 index 000000000000..935cf4bab2ea --- /dev/null +++ b/icons/sonar.svg @@ -0,0 +1 @@ +Sonar \ No newline at end of file From 25a657e2d7696641a7dae0021e03aed32da6663d Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 13:35:07 +0800 Subject: [PATCH 19/31] Add Fanfou icon (#7838) --- _data/simple-icons.json | 5 +++++ icons/fanfou.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/fanfou.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index c64d2ddf8385..0150f78cf55b 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -3607,6 +3607,11 @@ "hex": "FA005A", "source": "https://fandomdesignsystem.com/" }, + { + "title": "Fanfou", + "hex": "00CCFF", + "source": "https://fanfou.com" + }, { "title": "FARFETCH", "hex": "000000", diff --git a/icons/fanfou.svg b/icons/fanfou.svg new file mode 100644 index 000000000000..32a0122e7168 --- /dev/null +++ b/icons/fanfou.svg @@ -0,0 +1 @@ +Fanfou \ No newline at end of file From 0473aa1b6f4458c5f9af5cc041a4fa452bdfe34a Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 16:10:42 +0800 Subject: [PATCH 20/31] Add Electron Fiddle icon (#7839) --- _data/simple-icons.json | 5 +++++ icons/electronfiddle.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/electronfiddle.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 0150f78cf55b..5492c9e7c110 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -3301,6 +3301,11 @@ "hex": "47848F", "source": "https://www.electronjs.org/" }, + { + "title": "Electron Fiddle", + "hex": "E79537", + "source": "https://github.com/electron/fiddle" + }, { "title": "electron-builder", "hex": "FFFFFF", diff --git a/icons/electronfiddle.svg b/icons/electronfiddle.svg new file mode 100644 index 000000000000..85faa8a00e27 --- /dev/null +++ b/icons/electronfiddle.svg @@ -0,0 +1 @@ +Electron Fiddle \ No newline at end of file From 51e9e8f356d904d0bd6ae3805e0d667edc15ccb9 Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 18:29:47 +0800 Subject: [PATCH 21/31] Add MacPaw icon (#7842) --- _data/simple-icons.json | 5 +++++ icons/macpaw.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/macpaw.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 5492c9e7c110..2f2425e54691 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -6499,6 +6499,11 @@ "hex": "000000", "source": "https://commons.wikimedia.org/wiki/File:MacOS_wordmark_(2017).svg" }, + { + "title": "MacPaw", + "hex": "000000", + "source": "https://macpaw.com" + }, { "title": "Macy's", "hex": "E21A2C", diff --git a/icons/macpaw.svg b/icons/macpaw.svg new file mode 100644 index 000000000000..24ba8444691b --- /dev/null +++ b/icons/macpaw.svg @@ -0,0 +1 @@ +MacPaw \ No newline at end of file From dcdffce1c728acbb6688305330213dd5708cde2b Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 18:34:43 +0800 Subject: [PATCH 22/31] Add Similarweb icon (#7841) --- _data/simple-icons.json | 5 +++++ icons/similarweb.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/similarweb.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 2f2425e54691..058df6b1ea14 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -10059,6 +10059,11 @@ "hex": "3A76F0", "source": "https://github.com/signalapp/Signal-Desktop/blob/9db8765b6cf270195e45a7f251374d4e53d54c95/images/signal-logo.svg" }, + { + "title": "Similarweb", + "hex": "092540", + "source": "https://www.similarweb.com" + }, { "title": "Simkl", "hex": "000000", diff --git a/icons/similarweb.svg b/icons/similarweb.svg new file mode 100644 index 000000000000..87565e6bbac5 --- /dev/null +++ b/icons/similarweb.svg @@ -0,0 +1 @@ +Similarweb \ No newline at end of file From f6fe7db9fd883fc6a6a485f017b2f3e1e60ef57e Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 18:37:18 +0800 Subject: [PATCH 23/31] Add Setapp icon (#7840) --- _data/simple-icons.json | 5 +++++ icons/setapp.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/setapp.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 058df6b1ea14..79f9f1d9e48a 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -9967,6 +9967,11 @@ "hex": "1AB394", "source": "https://sessionize.com/brand" }, + { + "title": "Setapp", + "hex": "E6C3A5", + "source": "https://setapp.com" + }, { "title": "SFML", "hex": "8CC445", diff --git a/icons/setapp.svg b/icons/setapp.svg new file mode 100644 index 000000000000..598cbb8138be --- /dev/null +++ b/icons/setapp.svg @@ -0,0 +1 @@ +Setapp \ No newline at end of file From 97eb92be28e94a5af0be086f4357429cbfb41785 Mon Sep 17 00:00:00 2001 From: Phong Date: Wed, 21 Sep 2022 20:35:38 +0700 Subject: [PATCH 24/31] Add Shopee icon (#5896) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/shopee.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/shopee.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 79f9f1d9e48a..491b42b6c47f 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -10022,6 +10022,11 @@ "hex": "343434", "source": "https://shikimori.one" }, + { + "title": "Shopee", + "hex": "EE4D2D", + "source": "https://shopee.com" + }, { "title": "Shopify", "hex": "7AB55C", diff --git a/icons/shopee.svg b/icons/shopee.svg new file mode 100644 index 000000000000..1e4393f527d7 --- /dev/null +++ b/icons/shopee.svg @@ -0,0 +1 @@ +Shopee \ No newline at end of file From af32c3501651f045643b16c07b6d32ea50af92a6 Mon Sep 17 00:00:00 2001 From: deepmalamittal Date: Wed, 21 Sep 2022 10:55:33 -0400 Subject: [PATCH 25/31] Add Fantom icon (#7030) Co-authored-by: LitoMore --- _data/simple-icons.json | 5 +++++ icons/fantom.svg | 1 + 2 files changed, 6 insertions(+) create mode 100644 icons/fantom.svg diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 491b42b6c47f..5b48d3193bbd 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -3617,6 +3617,11 @@ "hex": "00CCFF", "source": "https://fanfou.com" }, + { + "title": "Fantom", + "hex": "0928FF", + "source": "https://fantom.foundation/" + }, { "title": "FARFETCH", "hex": "000000", diff --git a/icons/fantom.svg b/icons/fantom.svg new file mode 100644 index 000000000000..e4b768670a37 --- /dev/null +++ b/icons/fantom.svg @@ -0,0 +1 @@ +Fantom \ No newline at end of file From d5444f699528a456ee2894751994b4eef7274235 Mon Sep 17 00:00:00 2001 From: LitoMore Date: Wed, 21 Sep 2022 23:57:07 +0800 Subject: [PATCH 26/31] Update Douban icon (#7843) --- _data/simple-icons.json | 4 ++-- icons/douban.svg | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 5b48d3193bbd..32ee2c761236 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -3063,8 +3063,8 @@ }, { "title": "Douban", - "hex": "007722", - "source": "https://zh.wikipedia.org/wiki/Douban", + "hex": "2D963D", + "source": "https://www.douban.com/about", "license": { "type": "custom", "url": "https://www.douban.com/about/legal#info_data" diff --git a/icons/douban.svg b/icons/douban.svg index 0f5d0c0b2c98..cabc267da3e4 100644 --- a/icons/douban.svg +++ b/icons/douban.svg @@ -1 +1 @@ -Douban \ No newline at end of file +Douban \ No newline at end of file From fdc707bf81fd7240481c39050b1ef9b0063e27ec Mon Sep 17 00:00:00 2001 From: LitoMore Date: Sat, 24 Sep 2022 02:44:28 +0800 Subject: [PATCH 27/31] Build icons in order (#7852) --- scripts/build/package.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/scripts/build/package.js b/scripts/build/package.js index 0088eac93427..bfd4ece37873 100644 --- a/scripts/build/package.js +++ b/scripts/build/package.js @@ -81,31 +81,29 @@ const build = async () => { }; // 'main' - const iconsBarrelMjs = []; - const iconsBarrelJs = []; - const iconsBarrelDts = []; - const buildIcons = []; - - await Promise.all( + const buildIcons = await Promise.all( icons.map(async (icon) => { const filename = getIconSlug(icon); const svgFilepath = path.resolve(iconsDir, `${filename}.svg`); icon.svg = (await fs.readFile(svgFilepath, UTF8)).replace(/\r?\n/, ''); icon.path = svgToPath(icon.svg); icon.slug = filename; - buildIcons.push(icon); - const iconObject = iconToObject(icon); - const iconExportName = slugToVariableName(icon.slug); - - // add object to the barrel file - iconsBarrelJs.push(`${iconExportName}:${iconObject},`); - iconsBarrelMjs.push(`export const ${iconExportName}=${iconObject}`); - iconsBarrelDts.push(`export const ${iconExportName}:I;`); + return { icon, iconObject, iconExportName }; }), ); + const iconsBarrelDts = []; + const iconsBarrelJs = []; + const iconsBarrelMjs = []; + + buildIcons.forEach(({ icon, iconObject, iconExportName }) => { + iconsBarrelDts.push(`export const ${iconExportName}:I;`); + iconsBarrelJs.push(`${iconExportName}:${iconObject},`); + iconsBarrelMjs.push(`export const ${iconExportName}=${iconObject}`); + }); + // constants used in templates to reduce package size const constantsString = `const a='',b='';`; @@ -113,7 +111,7 @@ const build = async () => { const rawIndexJs = util.format( indexTemplate, constantsString, - buildIcons.map(iconToKeyValue).join(','), + buildIcons.map(({ icon }) => iconToKeyValue(icon)).join(','), ); await writeJs(indexFile, rawIndexJs); From ad7de0434edaf57f3bb39bf8a4f94bda64fc02ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar?= Date: Sat, 24 Sep 2022 17:29:43 +0200 Subject: [PATCH 28/31] Standarize locale comparisons and sort icons by title in package (#7854) * Use Intl.Collator for locale comparisons * Sort icons by title in package --- .svglintrc.mjs | 3 ++- scripts/build/package.js | 4 +++- scripts/lint/ourlint.js | 10 +++++----- scripts/utils.js | 10 ++++++++++ 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/.svglintrc.mjs b/.svglintrc.mjs index 85fbd6cc569e..4733e2a2c1a8 100644 --- a/.svglintrc.mjs +++ b/.svglintrc.mjs @@ -3,6 +3,7 @@ import path from 'node:path'; import { getDirnameFromImportMeta, htmlFriendlyToTitle, + collator, } from './scripts/utils.js'; import svgpath from 'svgpath'; import svgPathBbox from 'svg-path-bbox'; @@ -46,7 +47,7 @@ const sortObjectByKey = (obj) => { const sortObjectByValue = (obj) => { return Object.keys(obj) - .sort((a, b) => ('' + obj[a]).localeCompare(obj[b])) + .sort((a, b) => collator.compare(obj[a], obj[b])) .reduce((r, k) => Object.assign(r, { [k]: obj[k] }), {}); }; diff --git a/scripts/build/package.js b/scripts/build/package.js index bfd4ece37873..9c781b4e5349 100644 --- a/scripts/build/package.js +++ b/scripts/build/package.js @@ -18,6 +18,7 @@ import { slugToVariableName, getIconsData, getDirnameFromImportMeta, + collator, } from '../utils.js'; const __dirname = getDirnameFromImportMeta(import.meta.url); @@ -98,7 +99,8 @@ const build = async () => { const iconsBarrelJs = []; const iconsBarrelMjs = []; - buildIcons.forEach(({ icon, iconObject, iconExportName }) => { + buildIcons.sort((a, b) => collator.compare(a.icon.title, b.icon.title)); + buildIcons.forEach(({ iconObject, iconExportName }) => { iconsBarrelDts.push(`export const ${iconExportName}:I;`); iconsBarrelJs.push(`${iconExportName}:${iconObject},`); iconsBarrelMjs.push(`export const ${iconExportName}=${iconObject}`); diff --git a/scripts/lint/ourlint.js b/scripts/lint/ourlint.js index 677775a4a7c3..39d48ea78d06 100644 --- a/scripts/lint/ourlint.js +++ b/scripts/lint/ourlint.js @@ -6,7 +6,7 @@ */ import fakeDiff from 'fake-diff'; -import { getIconsDataString, normalizeNewlines } from '../utils.js'; +import { getIconsDataString, normalizeNewlines, collator } from '../utils.js'; /** * Contains our tests so they can be isolated from each other. @@ -18,12 +18,12 @@ const TESTS = { const collector = (invalidEntries, icon, index, array) => { if (index > 0) { const prev = array[index - 1]; - const compare = icon.title.localeCompare(prev.title); - if (compare < 0) { + const comparison = collator.compare(icon.title, prev.title); + if (comparison < 0) { invalidEntries.push(icon); - } else if (compare === 0) { + } else if (comparison === 0) { if (prev.slug) { - if (!icon.slug || icon.slug.localeCompare(prev.slug) < 0) { + if (!icon.slug || collator.compare(icon.slug, prev.slug) < 0) { invalidEntries.push(icon); } } diff --git a/scripts/utils.js b/scripts/utils.js index db0fed588c19..7ffae8a9e98f 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -153,3 +153,13 @@ export const getThirdPartyExtensions = async (readmePath) => }, }; }); + +/** + * `Intl.Collator` object ready to be used for icon titles sorting. + * @type {Intl.Collator} + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator + **/ +export const collator = new Intl.Collator('en', { + usage: 'search', + caseFirst: 'upper', +}); From 3ee620b9d6d17e2270bddeb4607d2bb23b1efe61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mond=C3=A9jar?= Date: Sat, 24 Sep 2022 17:37:03 +0200 Subject: [PATCH 29/31] Forbid the usage of non secure URLs (#7855) * Forbid the usage of non secure URLs * Document in CONTRIBUTING * Add test to forbid HTTP URLs in documentation pages --- .jsonschema.json | 3 +- CONTRIBUTING.md | 2 + LICENSE.md | 2 +- _data/simple-icons.json | 156 ++++++++++++------------- scripts/utils.js | 2 + tests/{readme.test.js => docs.test.js} | 24 ++++ tests/test-icon.js | 4 +- 7 files changed, 112 insertions(+), 81 deletions(-) rename tests/{readme.test.js => docs.test.js} (74%) diff --git a/.jsonschema.json b/.jsonschema.json index e6134f20950f..58b00dc84806 100644 --- a/.jsonschema.json +++ b/.jsonschema.json @@ -231,8 +231,9 @@ }, "url": { "$id": "#url", + "description": "HTTPS-only URL for a source", "type": "string", - "pattern": "^https?://[^\\s]+$" + "pattern": "^https://[^\\s]+$" } }, "type": "object", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c89ec0c48cfc..9e0ebd075832 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -291,6 +291,8 @@ Here is the object of the fictional brand from before, but with all optional val } ``` +> Non secured HTTP URLs are forbidden. If a brand's website only supports HTTP, you must still declare the URL using the `https://` protocol. + #### Source Guidelines We use the source URL as a reference for the current SVG in our repository and as a jumping-off point to find updates if the logo changes. If you used one of the sources listed below, make sure to follow these guidelines. If you're unsure about the source URL you can open a Pull Request and ask for help from others. diff --git a/LICENSE.md b/LICENSE.md index da5b887934e1..f0f4b0328708 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -27,4 +27,4 @@ For these and/or other purposes and motivations, and without any expectation of 3. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person’s Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. 4. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. -For more information, please see http://creativecommons.org/publicdomain/zero/1.0/. +For more information, please see https://creativecommons.org/publicdomain/zero/1.0/. diff --git a/_data/simple-icons.json b/_data/simple-icons.json index 32ee2c761236..afb6b860c5ca 100644 --- a/_data/simple-icons.json +++ b/_data/simple-icons.json @@ -118,12 +118,12 @@ { "title": "ACM", "hex": "0085CA", - "source": "http://identitystandards.acm.org/" + "source": "https://identitystandards.acm.org/" }, { "title": "ActiGraph", "hex": "0B2C4A", - "source": "http://www.actigraphcorp.com/" + "source": "https://www.actigraphcorp.com/" }, { "title": "Activision", @@ -148,7 +148,7 @@ { "title": "AddThis", "hex": "FF6550", - "source": "http://www.addthis.com/" + "source": "https://www.addthis.com/" }, { "title": "AdGuard", @@ -265,7 +265,7 @@ { "title": "Aerospike", "hex": "C41E25", - "source": "http://pages.aerospike.com/rs/aerospike/images/Acid_Whitepaper.pdf" + "source": "https://pages.aerospike.com/rs/aerospike/images/Acid_Whitepaper.pdf" }, { "title": "AEW", @@ -335,7 +335,7 @@ { "title": "Air China", "hex": "E30E17", - "source": "http://www.airchina.com.cn/en/investor_relations/" + "source": "https://www.airchina.com.cn/en/investor_relations/" }, { "title": "Air France", @@ -410,7 +410,7 @@ { "title": "Alfa Romeo", "hex": "981E32", - "source": "http://www.fcaci.com/x/Alfa" + "source": "https://www.fcaci.com/x/Alfa" }, { "title": "Alfred", @@ -465,7 +465,7 @@ { "title": "AlloCiné", "hex": "FECC00", - "source": "http://www.allocine.fr/" + "source": "https://www.allocine.fr/" }, { "title": "AllTrails", @@ -796,7 +796,7 @@ { "title": "Apache CloudStack", "hex": "2AA5DC", - "source": "http://cloudstack.apache.org/trademark-guidelines.html" + "source": "https://cloudstack.apache.org/trademark-guidelines.html" }, { "title": "Apache Cordova", @@ -1269,7 +1269,7 @@ { "title": "Azure DevOps", "hex": "0078D7", - "source": "http://azure.com/devops" + "source": "https://azure.microsoft.com/products/devops/" }, { "title": "Azure Functions", @@ -1627,7 +1627,7 @@ { "title": "Bootstrap", "hex": "7952B3", - "source": "http://getbootstrap.com/about" + "source": "https://getbootstrap.com/about" }, { "title": "BorgBackup", @@ -1890,7 +1890,7 @@ { "title": "Castro", "hex": "00B265", - "source": "http://supertop.co/castro/press/" + "source": "https://supertop.co/castro/press/" }, { "title": "Caterpillar", @@ -2192,7 +2192,7 @@ { "title": "Co-op", "hex": "00B1E7", - "source": "http://www.co-operative.coop/corporate/press/logos/" + "source": "https://www.co-operative.coop/media/assets" }, { "title": "Cockpit", @@ -2271,7 +2271,7 @@ { "title": "Codeforces", "hex": "1F8ACB", - "source": "http://codeforces.com/" + "source": "https://codeforces.com/" }, { "title": "CodeIgniter", @@ -2594,12 +2594,12 @@ { "title": "CSS Wizardry", "hex": "F43059", - "source": "http://csswizardry.com" + "source": "https://csswizardry.com" }, { "title": "CSS3", "hex": "1572B6", - "source": "http://www.w3.org/html/logo/" + "source": "https://www.w3.org/html/logo/" }, { "title": "Cucumber", @@ -2842,7 +2842,7 @@ "title": "del.icio.us", "slug": "delicious", "hex": "0000FF", - "source": "http://del.icio.us/", + "source": "https://del.icio.us/", "aliases": { "aka": [ "Delicious" @@ -2916,7 +2916,7 @@ { "title": "DeviantArt", "hex": "05CC47", - "source": "http://help.deviantart.com/21" + "source": "https://help.deviantart.com/21" }, { "title": "Devpost", @@ -3381,7 +3381,7 @@ { "title": "Empire Kred", "hex": "72BE50", - "source": "http://www.empire.kred" + "source": "https://www.empire.kred" }, { "title": "Enpass", @@ -3529,7 +3529,7 @@ { "title": "Expo", "hex": "000020", - "source": "http://expo.io/brand/" + "source": "https://expo.io/brand/" }, { "title": "Express", @@ -3665,7 +3665,7 @@ { "title": "FeatHub", "hex": "9B9B9B", - "source": "http://feathub.com/" + "source": "https://feathub.com/" }, { "title": "FedEx", @@ -3706,7 +3706,7 @@ { "title": "Fiat", "hex": "941711", - "source": "http://www.fcaci.com/x/FIATv15" + "source": "https://www.fcaci.com/x/FIATv15" }, { "title": "Fido Alliance", @@ -3775,7 +3775,7 @@ { "title": "Fitbit", "hex": "00B0B9", - "source": "http://www.fitbit.com/uk/home" + "source": "https://www.fitbit.com/uk/home" }, { "title": "FITE", @@ -3880,7 +3880,7 @@ { "title": "Fnac", "hex": "E1A925", - "source": "http://www.fnac.com/" + "source": "https://www.fnac.com/" }, { "title": "Folium", @@ -3925,7 +3925,7 @@ { "title": "Fortinet", "hex": "EE3124", - "source": "http://www.fortinet.com/" + "source": "https://www.fortinet.com/" }, { "title": "Fortran", @@ -4179,7 +4179,7 @@ { "title": "Git", "hex": "F05032", - "source": "http://git-scm.com/downloads/logos", + "source": "https://git-scm.com/downloads/logos", "license": { "type": "CC-BY-3.0" } @@ -4381,7 +4381,7 @@ { "title": "GoldenLine", "hex": "FFE005", - "source": "http://www.goldenline.pl" + "source": "https://www.goldenline.pl" }, { "title": "Goodreads", @@ -4575,7 +4575,7 @@ { "title": "Google Sheets", "hex": "34A853", - "source": "http://sheets.google.com/" + "source": "https://sheets.google.com/" }, { "title": "Google Street View", @@ -4642,7 +4642,7 @@ { "title": "Grav", "hex": "221E1F", - "source": "http://getgrav.org/media" + "source": "https://getgrav.org/media" }, { "title": "Gravatar", @@ -4844,7 +4844,7 @@ { "title": "Hatena Bookmark", "hex": "00A4DE", - "source": "http://hatenacorp.jp/press/resource" + "source": "https://hatenacorp.jp/press/resource" }, { "title": "haveibeenpwned", @@ -5049,7 +5049,7 @@ { "title": "HTML5", "hex": "E34F26", - "source": "http://www.w3.org/html/logo/" + "source": "https://www.w3.org/html/logo/" }, { "title": "HTTPie", @@ -5473,7 +5473,7 @@ "title": "Jabber", "hex": "CC0000", "source": "https://commons.wikimedia.org/wiki/File:Jabber-bulb.svg", - "guidelines": "http://www.jabber.org/faq.html#logo", + "guidelines": "https://www.jabber.org/faq.html#logo", "license": { "type": "CC-BY-2.5" } @@ -5525,8 +5525,8 @@ { "title": "Jeep", "hex": "000000", - "source": "http://www.fcaci.com/x/JEEPv15", - "guidelines": "http://www.fcaci.com/x/JEEPv15" + "source": "https://www.fcaci.com/x/JEEPv15", + "guidelines": "https://www.fcaci.com/x/JEEPv15" }, { "title": "Jekyll", @@ -5989,8 +5989,8 @@ { "title": "Komoot", "hex": "6AA127", - "source": "http://newsroom.komoot.com/media_kits/219423/", - "guidelines": "http://newsroom.komoot.com/media_kits/219423/" + "source": "https://newsroom.komoot.com/media_kits/219423/", + "guidelines": "https://newsroom.komoot.com/media_kits/219423/" }, { "title": "Konami", @@ -6282,8 +6282,8 @@ { "title": "LINE", "hex": "00C300", - "source": "http://line.me/en/logo", - "guidelines": "http://line.me/en/logo" + "source": "https://line.me/en/logo", + "guidelines": "https://line.me/en/logo" }, { "title": "LineageOS", @@ -6379,7 +6379,7 @@ { "title": "LiveJournal", "hex": "00B0EA", - "source": "http://www.livejournal.com" + "source": "https://www.livejournal.com" }, { "title": "Livewire", @@ -6522,7 +6522,7 @@ { "title": "Magento", "hex": "EE672F", - "source": "http://magento.com" + "source": "https://magento.com" }, { "title": "Magisk", @@ -6537,8 +6537,8 @@ { "title": "MailChimp", "hex": "FFE01B", - "source": "http://mailchimp.com/about/brand-assets", - "guidelines": "http://mailchimp.com/about/brand-assets" + "source": "https://mailchimp.com/about/brand-assets", + "guidelines": "https://mailchimp.com/about/brand-assets" }, { "title": "Mailgun", @@ -6554,7 +6554,7 @@ { "title": "MakerBot", "hex": "FF1E0D", - "source": "http://www.makerbot.com/makerbot-press-assets" + "source": "https://www.makerbot.com/makerbot-press-assets" }, { "title": "MAMP", @@ -6675,7 +6675,7 @@ { "title": "Matternet", "hex": "261C29", - "source": "http://mttr.net" + "source": "https://mttr.net" }, { "title": "Max", @@ -6813,7 +6813,7 @@ { "title": "Meteor", "hex": "DE4F4F", - "source": "http://logo.meteorapp.com/" + "source": "https://logo.meteorapp.com/" }, { "title": "Metro", @@ -6853,7 +6853,7 @@ { "title": "Microgenetics", "hex": "FF0000", - "source": "http://microgenetics.co.uk/" + "source": "https://microgenetics.co.uk/" }, { "title": "MicroPython", @@ -7313,7 +7313,7 @@ { "title": "NetApp", "hex": "0067C5", - "source": "http://www.netapp.com/", + "source": "https://www.netapp.com/", "guidelines": "https://www.netapp.com/company/legal/trademark-guidelines/" }, { @@ -7643,7 +7643,7 @@ { "title": "OCaml", "hex": "EC6813", - "source": "http://ocaml.org/img/OCaml_Sticker.svg", + "source": "https://ocaml.org/img/OCaml_Sticker.svg", "guidelines": "https://ocaml.org/docs/logos.html", "license": { "type": "Unlicense" @@ -8099,7 +8099,7 @@ { "title": "Parity Substrate", "hex": "282828", - "source": "http://substrate.dev/" + "source": "https://substrate.dev/" }, { "title": "Parse.ly", @@ -8110,7 +8110,7 @@ { "title": "Passport", "hex": "34E27A", - "source": "http://www.passportjs.org/" + "source": "https://www.passportjs.org/" }, { "title": "Pastebin", @@ -8179,8 +8179,8 @@ { "title": "Pepsi", "hex": "2151A1", - "source": "http://gillettepepsicola.com/promotions-media/media-kit/", - "guidelines": "http://gillettepepsicola.com/promotions-media/media-kit/" + "source": "https://gillettepepsicola.com/promotions-media/media-kit/", + "guidelines": "https://gillettepepsicola.com/promotions-media/media-kit/" }, { "title": "Percy", @@ -8256,7 +8256,7 @@ { "title": "PHP", "hex": "777BB4", - "source": "http://php.net/download-logos.php", + "source": "https://php.net/download-logos.php", "license": { "type": "CC-BY-SA-4.0" } @@ -9144,8 +9144,8 @@ { "title": "Ram", "hex": "000000", - "source": "http://www.fcaci.com/x/RAMv15", - "guidelines": "http://www.fcaci.com/x/RAMv15" + "source": "https://www.fcaci.com/x/RAMv15", + "guidelines": "https://www.fcaci.com/x/RAMv15" }, { "title": "Rancher", @@ -9639,7 +9639,7 @@ { "title": "Ruby on Rails", "hex": "CC0000", - "source": "http://rubyonrails.org/", + "source": "https://rubyonrails.org/", "guidelines": "https://rubyonrails.org/trademarks/" }, { @@ -9738,7 +9738,7 @@ { "title": "San Francisco Municipal Railway", "hex": "BA0C2F", - "source": "http://www.actransit.org/wp-content/uploads/HSP_CC-sched.pdf" + "source": "https://www.actransit.org/wp-content/uploads/HSP_CC-sched.pdf" }, { "title": "SanDisk", @@ -9758,8 +9758,8 @@ { "title": "Sass", "hex": "CC6699", - "source": "http://sass-lang.com/styleguide/brand", - "guidelines": "http://sass-lang.com/styleguide/brand", + "source": "https://sass-lang.com/styleguide/brand", + "guidelines": "https://sass-lang.com/styleguide/brand", "license": { "type": "CC-BY-NC-SA-3.0" } @@ -9927,8 +9927,8 @@ { "title": "Sencha", "hex": "86BC40", - "source": "http://design.sencha.com/", - "guidelines": "http://design.sencha.com/productlogo.html" + "source": "https://design.sencha.com/", + "guidelines": "https://design.sencha.com/productlogo.html" }, { "title": "Sennheiser", @@ -9959,7 +9959,7 @@ { "title": "Server Fault", "hex": "E7282D", - "source": "http://stackoverflow.com/company/logos", + "source": "https://stackoverflow.com/company/logos", "guidelines": "https://stackoverflow.com/legal/trademark-guidance" }, { @@ -10116,7 +10116,7 @@ { "title": "SitePoint", "hex": "258AAF", - "source": "http://www.sitepoint.com" + "source": "https://www.sitepoint.com" }, { "title": "Sketch", @@ -10163,7 +10163,7 @@ { "title": "Skype", "hex": "00AFF0", - "source": "http://blogs.skype.com/?attachment_id=56273" + "source": "https://blogs.skype.com/?attachment_id=56273" }, { "title": "Skype for Business", @@ -10407,7 +10407,7 @@ { "title": "Spacemacs", "hex": "9266CC", - "source": "http://spacemacs.org/", + "source": "https://spacemacs.org/", "license": { "type": "CC-BY-SA-4.0" } @@ -10560,7 +10560,7 @@ "title": "Squarespace", "hex": "000000", "source": "https://www.squarespace.com/logo-guidelines", - "guidelines": "http://www.squarespace.com/brand-guidelines" + "guidelines": "https://www.squarespace.com/brand-guidelines" }, { "title": "SSRN", @@ -10570,7 +10570,7 @@ { "title": "Stack Exchange", "hex": "1E5397", - "source": "http://stackoverflow.com/company/logos", + "source": "https://stackoverflow.com/company/logos", "guidelines": "https://stackoverflow.com/legal/trademark-guidance" }, { @@ -10714,7 +10714,7 @@ { "title": "Stencyl", "hex": "8E1C04", - "source": "http://www.stencyl.com/about/press/" + "source": "https://www.stencyl.com/about/press/" }, { "title": "Stimulus", @@ -10782,7 +10782,7 @@ { "title": "StubHub", "hex": "003168", - "source": "http://www.stubhub.com" + "source": "https://www.stubhub.com" }, { "title": "styled-components", @@ -10822,7 +10822,7 @@ { "title": "Subversion", "hex": "809CC9", - "source": "http://subversion.apache.org/logo" + "source": "https://subversion.apache.org/logo" }, { "title": "suckless", @@ -11328,7 +11328,7 @@ { "title": "Tinder", "hex": "FF6B6B", - "source": "http://www.gotinder.com/press" + "source": "https://www.gotinder.com/press" }, { "title": "TinyLetter", @@ -11601,7 +11601,7 @@ { "title": "Twoo", "hex": "FF7102", - "source": "http://www.twoo.com/about/press" + "source": "https://www.twoo.com/about/press" }, { "title": "Typeform", @@ -12024,7 +12024,7 @@ { "title": "VLC media player", "hex": "FF8800", - "source": "http://git.videolan.org/?p=vlc.git;a=tree;f=extras/package/macosx/asset_sources" + "source": "https://git.videolan.org/?p=vlc.git;a=tree;f=extras/package/macosx/asset_sources" }, { "title": "VMware", @@ -12268,7 +12268,7 @@ { "title": "WEBTOON", "hex": "00D564", - "source": "http://webtoons.com/" + "source": "https://webtoons.com/" }, { "title": "WeChat", @@ -12421,7 +12421,7 @@ { "title": "Wire", "hex": "000000", - "source": "http://brand.wire.com", + "source": "https://brand.wire.com", "guidelines": "https://brand.wire.com/" }, { @@ -12454,7 +12454,7 @@ { "title": "Wix", "hex": "0C6EFC", - "source": "http://www.wix.com/about/design-assets" + "source": "https://www.wix.com/about/design-assets" }, { "title": "Wizz Air", @@ -12464,17 +12464,17 @@ { "title": "Wolfram", "hex": "DD1100", - "source": "http://company.wolfram.com/press-center/wolfram-corporate/" + "source": "https://company.wolfram.com/press-center/wolfram-corporate/" }, { "title": "Wolfram Language", "hex": "DD1100", - "source": "http://company.wolfram.com/press-center/language/" + "source": "https://company.wolfram.com/press-center/language/" }, { "title": "Wolfram Mathematica", "hex": "DD1100", - "source": "http://company.wolfram.com/press-center/mathematica/" + "source": "https://company.wolfram.com/press-center/mathematica/" }, { "title": "Woo", diff --git a/scripts/utils.js b/scripts/utils.js index 7ffae8a9e98f..72fd30dc09cd 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -28,6 +28,8 @@ const TITLE_TO_SLUG_CHARS_REGEX = RegExp( const TITLE_TO_SLUG_RANGE_REGEX = /[^a-z0-9]/g; +export const URL_REGEX = /^https:\/\/[^\s]+$/; + /** * Get the slug/filename for an icon. * @param {Object} icon The icon data as it appears in _data/simple-icons.json diff --git a/tests/readme.test.js b/tests/docs.test.js similarity index 74% rename from tests/readme.test.js rename to tests/docs.test.js index 0f95718bf171..b29eb009e21e 100644 --- a/tests/readme.test.js +++ b/tests/docs.test.js @@ -5,6 +5,7 @@ import { strict as assert } from 'node:assert'; import { getThirdPartyExtensions, getDirnameFromImportMeta, + URL_REGEX, } from '../scripts/utils.js'; const __dirname = getDirnameFromImportMeta(import.meta.url); @@ -63,3 +64,26 @@ test('README third party extensions must be alphabetically sorted', async () => 'Wrong alphabetical order of third party extensions in README.', ); }); + +test('Only allow HTTPS links in documentation pages', async () => { + const ignoreHttpLinks = ['http://www.w3.org/2000/svg']; + + const docsFiles = fs + .readdirSync(root) + .filter((fname) => fname.endsWith('.md')); + + const linksGetter = new RegExp('http://[^\\s"\']+', 'g'); + for (let docsFile of docsFiles) { + const docsFilePath = path.join(root, docsFile); + const docsFileContent = fs.readFileSync(docsFilePath, 'utf8'); + + Array.from(docsFileContent.matchAll(linksGetter)).forEach((match) => { + const link = match[0]; + assert.ok( + ignoreHttpLinks.includes(link) || link.startsWith('https://'), + `Link '${link}' in '${docsFile}' (at index ${match.index})` + + ` must use the HTTPS protocol.`, + ); + }); + } +}); diff --git a/tests/test-icon.js b/tests/test-icon.js index d52083a003b4..a17a3c5ab229 100644 --- a/tests/test-icon.js +++ b/tests/test-icon.js @@ -2,6 +2,7 @@ import fs from 'node:fs'; import path from 'node:path'; import { strict as assert } from 'node:assert'; import { describe, it } from 'mocha'; +import { URL_REGEX } from '../scripts/utils.js'; const iconsDir = path.resolve(process.cwd(), 'icons'); @@ -29,6 +30,7 @@ export const testIcon = (icon, subject, slug) => { it('has the correct "source"', () => { assert.equal(subject.source, icon.source); + assert.match(subject.source, URL_REGEX); }); it('has an "svg" value', () => { @@ -53,7 +55,7 @@ export const testIcon = (icon, subject, slug) => { if (icon.license.type === 'custom') { assert.equal(subject.license.url, icon.license.url); } else { - assert.match(subject.license.url, /^https?:\/\/[^\s]+$/); + assert.match(subject.license.url, URL_REGEX); } } else { assert.equal(subject.license, undefined); From 62fcc794a26cff717a355d609ca6cebfc63bb4c2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 25 Sep 2022 00:28:08 +0000 Subject: [PATCH 30/31] version bump --- package.json | 2 +- slugs.md | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 307217657fee..b8529399b9b0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-icons", - "version": "7.12.0", + "version": "7.13.0", "description": "SVG icons for popular brands https://simpleicons.org", "homepage": "https://simpleicons.org", "keywords": [ diff --git a/slugs.md b/slugs.md index 8de7af19f245..3f0382603b96 100644 --- a/slugs.md +++ b/slugs.md @@ -38,6 +38,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `AddThis` | `addthis` | | `AdGuard` | `adguard` | | `Adidas` | `adidas` | +| `Adminer` | `adminer` | | `Adobe` | `adobe` | | `Adobe Acrobat Reader` | `adobeacrobatreader` | | `Adobe After Effects` | `adobeaftereffects` | @@ -110,6 +111,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Amazon ECS` | `amazonecs` | | `Amazon EKS` | `amazoneks` | | `Amazon Fire TV` | `amazonfiretv` | +| `Amazon Games` | `amazongames` | | `Amazon Lumberyard` | `amazonlumberyard` | | `Amazon Pay` | `amazonpay` | | `Amazon Prime` | `amazonprime` | @@ -344,6 +346,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `C Sharp` | `csharp` | | `C++` | `cplusplus` | | `Cachet` | `cachet` | +| `CafePress` | `cafepress` | | `Caffeine` | `caffeine` | | `Cairo Metro` | `cairometro` | | `CakePHP` | `cakephp` | @@ -624,6 +627,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Elastic Stack` | `elasticstack` | | `Elasticsearch` | `elasticsearch` | | `Electron` | `electron` | +| `Electron Fiddle` | `electronfiddle` | | `electron-builder` | `electronbuilder` | | `Element` | `element` | | `elementary` | `elementary` | @@ -683,6 +687,8 @@ update the script at 'scripts/release/update-slugs-table.js'. | `FamPay` | `fampay` | | `Fandango` | `fandango` | | `Fandom` | `fandom` | +| `Fanfou` | `fanfou` | +| `Fantom` | `fantom` | | `FARFETCH` | `farfetch` | | `FastAPI` | `fastapi` | | `Fastify` | `fastify` | @@ -767,6 +773,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `G2` | `g2` | | `G2A` | `g2a` | | `Game & Watch` | `gameandwatch` | +| `Game Developer` | `gamedeveloper` | | `Game Jolt` | `gamejolt` | | `Garmin` | `garmin` | | `Gatling` | `gatling` | @@ -999,6 +1006,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Integromat` | `integromat` | | `Intel` | `intel` | | `IntelliJ IDEA` | `intellijidea` | +| `Interaction Design Foundation` | `interactiondesignfoundation` | | `InteractJS` | `interactjs` | | `Intercom` | `intercom` | | `Intermarche` | `intermarche` | @@ -1055,6 +1063,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `JSON` | `json` | | `JSON Web Tokens` | `jsonwebtokens` | | `JSS` | `jss` | +| `JUKE` | `juke` | | `Julia` | `julia` | | `Juniper Networks` | `junipernetworks` | | `JUnit5` | `junit5` | @@ -1205,6 +1214,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Lyft` | `lyft` | | `MAAS` | `maas` | | `macOS` | `macos` | +| `MacPaw` | `macpaw` | | `Macy's` | `macys` | | `Magasins U` | `magasinsu` | | `Magento` | `magento` | @@ -1709,6 +1719,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Redux-Saga` | `reduxsaga` | | `RedwoodJS` | `redwoodjs` | | `Reebok` | `reebok` | +| `Relay` | `relay` | | `Reliance Industries Limited` | `relianceindustrieslimited` | | `Remix` | `remix` | | `Ren'Py` | `renpy` | @@ -1721,6 +1732,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `ReScript` | `rescript` | | `RescueTime` | `rescuetime` | | `ResearchGate` | `researchgate` | +| `ReSharper` | `resharper` | | `Resurrection Remix OS` | `resurrectionremixos` | | `RetroArch` | `retroarch` | | `RetroPie` | `retropie` | @@ -1825,6 +1837,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Server Fault` | `serverfault` | | `Serverless` | `serverless` | | `Sessionize` | `sessionize` | +| `Setapp` | `setapp` | | `SFML` | `sfml` | | `Shadow` | `shadow` | | `Shanghai Metro` | `shanghaimetro` | @@ -1835,6 +1848,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Shenzhen Metro` | `shenzhenmetro` | | `Shields.io` | `shieldsdotio` | | `Shikimori` | `shikimori` | +| `Shopee` | `shopee` | | `Shopify` | `shopify` | | `Shopware` | `shopware` | | `Shotcut` | `shotcut` | @@ -1843,6 +1857,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Shutterstock` | `shutterstock` | | `Siemens` | `siemens` | | `Signal` | `signal` | +| `Similarweb` | `similarweb` | | `Simkl` | `simkl` | | `Simple Analytics` | `simpleanalytics` | | `Simple Icons` | `simpleicons` | @@ -1885,6 +1900,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Solidity` | `solidity` | | `Sololearn` | `sololearn` | | `Solus` | `solus` | +| `Sonar` | `sonar` | | `SonarCloud` | `sonarcloud` | | `SonarLint` | `sonarlint` | | `SonarQube` | `sonarqube` | @@ -2005,10 +2021,13 @@ update the script at 'scripts/release/update-slugs-table.js'. | `TableCheck` | `tablecheck` | | `Taco Bell` | `tacobell` | | `tado°` | `tado` | +| `Taichi Graphics` | `taichigraphics` | +| `Taichi Lang` | `taichilang` | | `Tails` | `tails` | | `Tailwind CSS` | `tailwindcss` | | `Talend` | `talend` | | `Talenthouse` | `talenthouse` | +| `Tamiya` | `tamiya` | | `Tampermonkey` | `tampermonkey` | | `Taobao` | `taobao` | | `Tapas` | `tapas` | @@ -2062,6 +2081,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Ticketmaster` | `ticketmaster` | | `Tidal` | `tidal` | | `Tide` | `tide` | +| `Tidyverse` | `tidyverse` | | `TietoEVRY` | `tietoevry` | | `TikTok` | `tiktok` | | `Tile` | `tile` | @@ -2195,6 +2215,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Visual Studio Code` | `visualstudiocode` | | `Vite` | `vite` | | `Vitess` | `vitess` | +| `Vitest` | `vitest` | | `Vivaldi` | `vivaldi` | | `Vivino` | `vivino` | | `VK` | `vk` | @@ -2207,6 +2228,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Vowpal Wabbit` | `vowpalwabbit` | | `VOX` | `vox` | | `VSCO` | `vsco` | +| `VSCodium` | `vscodium` | | `VTEX` | `vtex` | | `Vue.js` | `vuedotjs` | | `Vuetify` | `vuetify` | @@ -2221,6 +2243,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Walmart` | `walmart` | | `Wappalyzer` | `wappalyzer` | | `Warner Bros.` | `warnerbros` | +| `Warp` | `warp` | | `wasmCloud` | `wasmcloud` | | `Wasmer` | `wasmer` | | `Wattpad` | `wattpad` | @@ -2348,6 +2371,7 @@ update the script at 'scripts/release/update-slugs-table.js'. | `Zig` | `zig` | | `Zigbee` | `zigbee` | | `Zillow` | `zillow` | +| `ZincSearch` | `zincsearch` | | `Zingat` | `zingat` | | `Zoho` | `zoho` | | `Zoiper` | `zoiper` | From 5958fc117b80f8a8166564babe753e4ef35f27ab Mon Sep 17 00:00:00 2001 From: LitoMore Date: Sun, 25 Sep 2022 09:04:58 +0800 Subject: [PATCH 31/31] Add `add-icon-data` script (#7849) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Álvaro Mondéjar --- CONTRIBUTING.md | 2 + package.json | 6 +- scripts/add-icon-data.js | 137 +++++++++++++++++++++++++++++++++++++++ scripts/lint/ourlint.js | 2 +- scripts/utils.js | 44 +++++++++++-- 5 files changed, 184 insertions(+), 7 deletions(-) create mode 100644 scripts/add-icon-data.js diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e0ebd075832..e5b6682ae939 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -265,6 +265,8 @@ Here is the object of a fictional brand as an example: } ``` +You can use `npm run add-icon-data` to add metadata via a CLI prompt. + Make sure the icon is added in alphabetical order. If you're in doubt, you can always run `npm run our-lint` - this will tell you if any of the JSON data is in the wrong order. #### Optional Data diff --git a/package.json b/package.json index b8529399b9b0..69b4d23f52c9 100644 --- a/package.json +++ b/package.json @@ -37,10 +37,13 @@ "url": "https://opencollective.com/simple-icons" }, "devDependencies": { + "chalk": "^5.0.1", "editorconfig-checker": "4.0.2", "esbuild": "0.15.6", "fake-diff": "1.0.0", + "get-relative-luminance": "^1.0.0", "husky": "8.0.1", + "inquirer": "^9.1.2", "is-ci": "3.0.1", "jsonschema": "1.4.1", "mocha": "10.0.0", @@ -71,7 +74,8 @@ "pretest": "npm run prepublishOnly", "posttest": "npm run postpublish", "svgo": "svgo --config svgo.config.js", - "get-filename": "node scripts/get-filename.js" + "get-filename": "node scripts/get-filename.js", + "add-icon-data": "node scripts/add-icon-data.js" }, "engines": { "node": ">=0.12.18" diff --git a/scripts/add-icon-data.js b/scripts/add-icon-data.js new file mode 100644 index 000000000000..1f116b823dda --- /dev/null +++ b/scripts/add-icon-data.js @@ -0,0 +1,137 @@ +import fs from 'node:fs/promises'; +import inquirer from 'inquirer'; +import chalk from 'chalk'; +import getRelativeLuminance from 'get-relative-luminance'; +import { + URL_REGEX, + collator, + getIconsDataString, + getIconDataPath, + writeIconsData, + titleToSlug, + normalizeColor, +} from './utils.js'; + +const hexPattern = /^#?[a-f0-9]{3,8}$/i; + +const iconsData = JSON.parse(await getIconsDataString()); + +const titleValidator = (text) => { + if (!text) return 'This field is required'; + if ( + iconsData.icons.find( + (x) => x.title === text || titleToSlug(x.title) === titleToSlug(text), + ) + ) + return 'This icon title or slug already exist'; + return true; +}; + +const hexValidator = (text) => + hexPattern.test(text) ? true : 'This should be a valid hex code'; + +const sourceValidator = (text) => + URL_REGEX.test(text) ? true : 'This should be a secure URL'; + +const hexTransformer = (text) => { + const color = normalizeColor(text); + const luminance = hexPattern.test(text) + ? getRelativeLuminance.default(`#${color}`) + : -1; + if (luminance === -1) return text; + return chalk.bgHex(`#${color}`).hex(luminance < 0.4 ? '#fff' : '#000')(text); +}; + +const getIconDataFromAnswers = (answers) => ({ + title: answers.title, + hex: answers.hex, + source: answers.source, + ...(answers.hasGuidelines ? { guidelines: answers.guidelines } : {}), + ...(answers.hasLicense + ? { + license: { + type: answers.licenseType, + ...(answers.licenseUrl ? { url: answers.licenseUrl } : {}), + }, + } + : {}), +}); + +const dataPrompt = [ + { + type: 'input', + name: 'title', + message: 'Title', + validate: titleValidator, + }, + { + type: 'input', + name: 'hex', + message: 'Hex', + validate: hexValidator, + filter: (text) => normalizeColor(text), + transformer: hexTransformer, + }, + { + type: 'input', + name: 'source', + message: 'Source', + validate: sourceValidator, + }, + { + type: 'confirm', + name: 'hasGuidelines', + message: 'The icon has brand guidelines?', + }, + { + type: 'input', + name: 'guidelines', + message: 'Guidelines', + validate: sourceValidator, + when: ({ hasGuidelines }) => hasGuidelines, + }, + { + type: 'confirm', + name: 'hasLicense', + message: 'The icon has brand license?', + }, + { + type: 'input', + name: 'licenseType', + message: 'License type', + validate: (text) => Boolean(text), + when: ({ hasLicense }) => hasLicense, + }, + { + type: 'input', + name: 'licenseUrl', + message: 'License URL', + suffix: ' (optional)', + validate: (text) => !Boolean(text) || sourceValidator(text), + when: ({ hasLicense }) => hasLicense, + }, + { + type: 'confirm', + name: 'confirm', + message: (answers) => { + const icon = getIconDataFromAnswers(answers); + return [ + 'About to write to simple-icons.json', + chalk.reset(JSON.stringify(icon, null, 4)), + chalk.reset('Is this OK?'), + ].join('\n\n'); + }, + }, +]; + +const answers = await inquirer.prompt(dataPrompt); +const icon = getIconDataFromAnswers(answers); + +if (answers.confirm) { + iconsData.icons.push(icon); + iconsData.icons.sort((a, b) => collator.compare(a.title, b.title)); + await writeIconsData(iconsData); +} else { + console.log('Aborted.'); + process.exit(1); +} diff --git a/scripts/lint/ourlint.js b/scripts/lint/ourlint.js index 39d48ea78d06..3512a55b92fa 100644 --- a/scripts/lint/ourlint.js +++ b/scripts/lint/ourlint.js @@ -48,7 +48,7 @@ const TESTS = { /* Check the formatting of the data file */ prettified: async (data, dataString) => { const normalizedDataString = normalizeNewlines(dataString); - const dataPretty = `${JSON.stringify(data, null, ' ')}\n`; + const dataPretty = `${JSON.stringify(data, null, 4)}\n`; if (normalizedDataString !== dataPretty) { const dataDiff = fakeDiff(normalizedDataString, dataPretty); diff --git a/scripts/utils.js b/scripts/utils.js index 72fd30dc09cd..8cf6cee36653 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -4,7 +4,7 @@ */ import path from 'node:path'; -import { promises as fs } from 'node:fs'; +import fs from 'node:fs/promises'; import { fileURLToPath } from 'node:url'; const TITLE_TO_SLUG_REPLACEMENTS = { @@ -96,15 +96,22 @@ export const htmlFriendlyToTitle = (htmlFriendlyTitle) => ); /** - * Get contents of _data/simple-icons.json. + * Get path of _data/simpe-icons.json. * @param {String|undefined} rootDir Path to the root directory of the project. */ -export const getIconsDataString = (rootDir) => { +export const getIconDataPath = (rootDir) => { if (rootDir === undefined) { rootDir = path.resolve(getDirnameFromImportMeta(import.meta.url), '..'); } - const iconDataPath = path.resolve(rootDir, '_data', 'simple-icons.json'); - return fs.readFile(iconDataPath, 'utf8'); + return path.resolve(rootDir, '_data', 'simple-icons.json'); +}; + +/** + * Get contents of _data/simple-icons.json. + * @param {String|undefined} rootDir Path to the root directory of the project. + */ +export const getIconsDataString = (rootDir) => { + return fs.readFile(getIconDataPath(rootDir), 'utf8'); }; /** @@ -116,6 +123,19 @@ export const getIconsData = async (rootDir) => { return JSON.parse(fileContents).icons; }; +/** + * Write icons data to _data/simple-icons.json. + * @param {Object} iconsData Icons data object. + * @param {String|undefined} rootDir Path to the root directory of the project. + */ +export const writeIconsData = async (iconsData, rootDir) => { + return fs.writeFile( + getIconDataPath(rootDir), + `${JSON.stringify(iconsData, null, 4)}\n`, + 'utf8', + ); +}; + /** * Get the directory name where this file is located from `import.meta.url`, * equivalent to the `__dirname` global variable in CommonJS. @@ -132,6 +152,20 @@ export const normalizeNewlines = (text) => { return text.replace(/\r\n/g, '\n'); }; +/** + * Convert non-6-digit hex color to 6-digit. + * @param {String} text The color text + */ +export const normalizeColor = (text) => { + let color = text.replace('#', '').toUpperCase(); + if (color.length < 6) { + color = [...color.slice(0, 3)].map((x) => x.repeat(2)).join(''); + } else if (color.length > 6) { + color = color.slice(0, 6); + } + return color; +}; + /** * Get information about third party extensions. * @param {String} readmePath Path to the README file