Merge pull request #947 from simple-icons/develop
Publish Renren, Envato, Mastodon, Castorama, Java, Go and new API
17
README.md
@ -47,6 +47,23 @@ console.log(simpleIcons['Google+']);
|
||||
*/
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```js
|
||||
const googleplus = require('simple-icons/icons/googleplus');
|
||||
|
||||
console.log(googleplus);
|
||||
/*
|
||||
{
|
||||
title: 'Google+',
|
||||
hex: 'DC4E41',
|
||||
source: 'https://developers.google.com/+/branding-guidelines',
|
||||
svg: '<svg aria-labelledby="simpleicons-googleplus-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">...</svg>'
|
||||
}
|
||||
*/
|
||||
```
|
||||
|
||||
## Third Party Extensions
|
||||
|
||||
### WordPress
|
||||
|
@ -75,6 +75,11 @@
|
||||
"hex": "FF5A5F",
|
||||
"source": "https://www.airbnb.com"
|
||||
},
|
||||
{
|
||||
"title": "Go",
|
||||
"hex": "76E1FE",
|
||||
"source": "https://golang.org/doc/gopher/"
|
||||
},
|
||||
{
|
||||
"title": "Google Allo",
|
||||
"hex": "ECB842",
|
||||
@ -260,6 +265,11 @@
|
||||
"hex": "509CF6",
|
||||
"source": "https://www.campaignmonitor.com/brand"
|
||||
},
|
||||
{
|
||||
"title": "Castorama",
|
||||
"hex": "0078D7",
|
||||
"source": "https://www.castorama.fr/"
|
||||
},
|
||||
{
|
||||
"title": "Castro",
|
||||
"hex": "00B265",
|
||||
@ -470,6 +480,11 @@
|
||||
"hex": "72BE50",
|
||||
"source": "http://www.empire.kred"
|
||||
},
|
||||
{
|
||||
"title": "Envato",
|
||||
"hex": "81B441",
|
||||
"source": "https://envato.com/"
|
||||
},
|
||||
{
|
||||
"title": "Ethereum",
|
||||
"hex": "3C3C3D",
|
||||
@ -840,6 +855,11 @@
|
||||
"hex": "FF3366",
|
||||
"source": "https://projects.invisionapp.com/boards/BX4P1DY5H46R"
|
||||
},
|
||||
{
|
||||
"title": "Java",
|
||||
"hex": "007396",
|
||||
"source": "https://www.oracle.com/legal/logos.html"
|
||||
},
|
||||
{
|
||||
"title": "JavaScript",
|
||||
"hex": "F7DF1E",
|
||||
@ -1037,8 +1057,8 @@
|
||||
},
|
||||
{
|
||||
"title": "Mastodon",
|
||||
"hex": "189EFC",
|
||||
"source": "https://github.com/tootsuite/mastodon/blob/master/app/assets/images/logo.svg"
|
||||
"hex": "3088D4",
|
||||
"source": "https://source.joinmastodon.org/mastodon/joinmastodon/blob/master/public/press-kit.zip"
|
||||
},
|
||||
{
|
||||
"title": "Matternet",
|
||||
@ -1480,6 +1500,11 @@
|
||||
"hex": "764ABC",
|
||||
"source": "https://github.com/reactjs/redux/tree/master/logo"
|
||||
},
|
||||
{
|
||||
"title": "Renren",
|
||||
"hex": "217DC6",
|
||||
"source": "https://seeklogo.com/vector-logo/184137/renren-inc"
|
||||
},
|
||||
{
|
||||
"title": "ReverbNation",
|
||||
"hex": "E43526",
|
||||
|
1
icons/castorama.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-labelledby="simpleicons-castorama-icon" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title id="simpleicons-castorama-icon">Castorama icon</title><path d="M8.91 16.106c-2.129 0-3.659-1.794-3.659-4.266 0-2.148 1.468-4.095 3.488-4.095 2.275 0 3.545 1.857 3.545 1.857l2.939-3.298c-.91-1.062-2.598-2.882-6.503-2.882-4.388 0-8.209 3.489-8.209 8.456 0 4.766 3.475 8.532 8.266 8.532 3.855 0 5.572-2.017 6.54-3.129l-2.831-2.969c0 .001-1.415 1.794-3.576 1.794z"/><path d="M18.283 0v9.988h-2.064a1.92 1.92 0 1 0 0 3.84h2.064V24h5.205V0h-5.205z"/></svg>
|
After Width: | Height: | Size: 573 B |
1
icons/envato.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-labelledby="simpleicons-envato-icon" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title id="simpleicons-envato-icon">Envato icon</title><path d="M19.4.197c-.74-.371-2.721-.247-5.195.62-4.207 2.968-7.674 7.175-8.044 14.109 0 .241-.493 0-.617-.126-1.114-2.104-1.61-4.455-.62-7.921.247-.247-.37-.617-.37-.494-.249.123-1.114 1.113-1.734 2.103-2.847 4.947-.99 11.511 3.961 14.231 4.947 2.721 11.382.988 14.231-4.086 3.342-5.814.369-17.322-1.612-18.436"/></svg>
|
After Width: | Height: | Size: 487 B |
1
icons/go.svg
Normal file
After Width: | Height: | Size: 6.4 KiB |
1
icons/java.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-labelledby="simpleicons-java-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-java-icon">Java icon</title><path d="M8.851 18.56s-.917.534.653.714c1.902.218 2.874.187 4.969-.211 0 0 .552.346 1.321.646-4.699 2.013-10.633-.118-6.943-1.149M8.276 15.933s-1.028.761.542.924c2.032.209 3.636.227 6.413-.308 0 0 .384.389.987.602-5.679 1.661-12.007.13-7.942-1.218"/><path d="M13.116 11.475c1.158 1.333-.304 2.533-.304 2.533s2.939-1.518 1.589-3.418c-1.261-1.772-2.228-2.652 3.007-5.688 0-.001-8.216 2.051-4.292 6.573"/><path d="M19.33 20.504s.679.559-.747.991c-2.712.822-11.288 1.069-13.669.033-.856-.373.75-.89 1.254-.998.527-.114.828-.093.828-.093-.953-.671-6.156 1.317-2.643 1.887 9.58 1.553 17.462-.7 14.977-1.82M9.292 13.21s-4.362 1.036-1.544 1.412c1.189.159 3.561.123 5.77-.062 1.806-.152 3.618-.477 3.618-.477s-.637.272-1.098.587c-4.429 1.165-12.986.623-10.522-.568 2.082-1.006 3.776-.892 3.776-.892M17.116 17.584c4.503-2.34 2.421-4.589.968-4.285-.355.074-.515.138-.515.138s.132-.207.385-.297c2.875-1.011 5.086 2.981-.928 4.562 0-.001.07-.062.09-.118M14.401 0s2.494 2.494-2.365 6.33c-3.896 3.077-.888 4.832-.001 6.836-2.274-2.053-3.943-3.858-2.824-5.539 1.644-2.469 6.197-3.665 5.19-7.627"/><path d="M9.734 23.924c4.322.277 10.959-.153 11.116-2.198 0 0-.302.775-3.572 1.391-3.688.694-8.239.613-10.937.168 0-.001.553.457 3.393.639"/></svg>
|
After Width: | Height: | Size: 1.4 KiB |
@ -1 +1 @@
|
||||
<svg aria-labelledby="simpleicons-mastodon-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-mastodon-icon">Mastodon icon</title><path d="M12.012 0C8.833 0 5.785 1.263 3.537 3.511c-4.697 4.667-4.719 12.257-.052 16.954 4.668 4.695 12.257 4.717 16.953.049.016-.016.033-.031.051-.049 4.684-4.682 4.684-12.273 0-16.954C18.24 1.263 15.191 0 12.012 0zm0 6.713h2.566c-.457.322-.629 1.224-.648 1.769v4.993c0 1.064-.855 1.92-1.918 1.92-1.064 0-1.919-.855-1.919-1.92V8.632c-.001-1.064.854-1.919 1.919-1.919zM12 7.96c-.37 0-.672.3-.672.672 0 .37.301.672.672.672s.671-.301.671-.672-.298-.672-.671-.672zm-6.689.19c1.063 0 1.92.854 1.92 1.918v4.942c.021.549.191 1.449.648 1.77H5.311c-1.063 0-1.918-.855-1.918-1.916v-4.795c0-1.066.855-1.919 1.918-1.919zm13.404 0c1.063 0 1.918.854 1.918 1.918v4.795c0 1.064-.855 1.918-1.918 1.918h-2.568c.457-.322.631-1.223.65-1.771v-4.942c0-1.065.853-1.918 1.918-1.918zM5.301 9.398c-.373 0-.672.3-.672.66 0 .359.299.665.66.665.359 0 .665-.3.665-.669 0-.371-.3-.673-.67-.673l.017.017zm13.426 0c-.371 0-.672.3-.672.66 0 .359.299.665.672.665.369 0 .67-.3.67-.669 0-.371-.299-.673-.67-.673v.017zm-6.727.96c-.37 0-.672.3-.672.659s.301.675.672.675.671-.3.671-.675-.298-.674-.671-.674v.015zm-6.701 1.424c-.371 0-.67.3-.67.675 0 .375.299.674.66.674.359 0 .665-.299.665-.674 0-.375-.3-.675-.67-.675h.015zm13.428 0c-.371 0-.672.3-.672.675 0 .375.299.674.672.674.369 0 .67-.299.67-.674-.001-.375-.299-.675-.67-.675zm-6.727.96c-.37 0-.672.299-.672.674s.301.674.672.674.671-.299.671-.674-.298-.674-.671-.674zm-6.701 1.44c-.371 0-.67.299-.67.664 0 .367.299.676.66.676.359 0 .665-.301.665-.676s-.3-.67-.67-.67l.015.006zm13.428 0c-.371 0-.672.299-.672.664 0 .367.299.676.672.676.369 0 .67-.301.67-.676s-.299-.67-.67-.67v.006z"/></svg>
|
||||
<svg aria-labelledby="simpleicons-mastodon-icon" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title id="simpleicons-mastodon-icon">Mastodon icon</title><path d="M23.193 7.879c0-5.206-3.411-6.732-3.411-6.732C18.062.357 15.108.025 12.041 0h-.076c-3.068.025-6.02.357-7.74 1.147 0 0-3.411 1.526-3.411 6.732 0 1.192-.023 2.618.015 4.129.124 5.092.934 10.109 5.641 11.355 2.17.574 4.034.695 5.535.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.129.539c-2.165-.074-4.449-.233-4.799-2.891a5.499 5.499 0 0 1-.048-.745s2.125.52 4.817.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.507.475-6.507zm-4.024 6.709h-2.497V8.469c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.312v3.349h-2.483v-3.35c0-1.536-.602-2.312-1.802-2.312-1.085 0-1.628.655-1.628 1.944v6.119H4.832V8.284c0-1.289.328-2.313.987-3.07.68-.758 1.569-1.146 2.674-1.146 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.304z"/></svg>
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.0 KiB |
1
icons/renren.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg aria-labelledby="simpleicons-renren-icon" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title id="simpleicons-renren-icon">Renren icon</title><path d="M5.661 9.601V5.303a6.793 6.793 0 0 0-4.053 11.084c2.378-1.152 4.041-3.755 4.053-6.786zM6.793 13.715c-.423 1.752-1.687 3.249-3.262 4.244a6.759 6.759 0 0 0 3.261.833 6.771 6.771 0 0 0 3.262-.833c-1.575-.995-2.838-2.493-3.261-4.244zM11.977 7.613a6.789 6.789 0 0 0-4.052-2.31v4.265c0 3.044 1.666 5.662 4.051 6.817a6.766 6.766 0 0 1-1.607-4.386 6.754 6.754 0 0 1 1.608-4.386z"/><path d="M11.977 7.613c1.003 1.183 1.655 2.714 1.655 4.387s-.652 3.202-1.655 4.387l-.001-.001.001.001c2.378-1.151 4.087-3.755 4.099-6.786V5.303a6.9 6.9 0 0 0-4.099 2.31zM18.34 9.568c0 3.045 1.666 5.662 4.052 6.818A6.792 6.792 0 0 0 18.34 5.304v4.264zM17.208 13.715c-.423 1.752-1.687 3.249-3.262 4.244a6.759 6.759 0 0 0 3.261.833 6.771 6.771 0 0 0 3.262-.833c-1.574-.995-2.838-2.493-3.261-4.244z"/></svg>
|
After Width: | Height: | Size: 953 B |
18
index.js
@ -1,18 +0,0 @@
|
||||
const dataFile = './_data/simple-icons.json';
|
||||
const data = require(dataFile);
|
||||
const fs = require('fs');
|
||||
|
||||
const icons = {};
|
||||
|
||||
data.icons.forEach(i => {
|
||||
const filename = i.title.toLowerCase()
|
||||
.replace(/\+/g, "plus")
|
||||
.replace(/^\./, "dot-")
|
||||
.replace(/\.$/, "-dot")
|
||||
.replace(/\./g, "-dot-")
|
||||
.replace(/[ !’]/g, '');
|
||||
i.svg = fs.readFileSync(`${__dirname}/icons/${filename}.svg`, 'utf8');
|
||||
icons[i.title] = i
|
||||
});
|
||||
|
||||
module.exports = icons;
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "simple-icons",
|
||||
"version": "1.8.4",
|
||||
"version": "1.8.5",
|
||||
"description": "SVG icons for popular brands https://simpleicons.org",
|
||||
"homepage": "https://www.simpleicons.org",
|
||||
"keywords": [
|
||||
@ -23,6 +23,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"jsonlint": "jsonlint _data/simple-icons.json -q -V .jsonlintschema",
|
||||
"svglint": "svglint icons/* --ci"
|
||||
"svglint": "svglint icons/* --ci",
|
||||
"prepublishOnly": "node scripts/prepublish.js",
|
||||
"postpublish": "rm icons/*.js index.js"
|
||||
}
|
||||
}
|
||||
|
31
scripts/prepublish.js
Executable file
@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
const dataFile = "../_data/simple-icons.json";
|
||||
const indexFile = `${__dirname}/../index.js`;
|
||||
const iconsDir = `${__dirname}/../icons`;
|
||||
const data = require(dataFile);
|
||||
const fs = require("fs");
|
||||
|
||||
const { titleToFilename } = require("./utils");
|
||||
|
||||
const icons = {};
|
||||
data.icons.forEach(icon => {
|
||||
const filename = titleToFilename(icon.title);
|
||||
icon.svg = fs.readFileSync(`${iconsDir}/${filename}.svg`, "utf8");
|
||||
icons[icon.title] = icon;
|
||||
// write the static .js file for the icon
|
||||
fs.writeFileSync(
|
||||
`${iconsDir}/${filename}.js`,
|
||||
`module.exports=${JSON.stringify(icon)};`
|
||||
);
|
||||
});
|
||||
|
||||
// write our generic index.js
|
||||
fs.writeFileSync(indexFile, `module.exports=${JSON.stringify(icons)};`);
|
14
scripts/utils.js
Normal file
@ -0,0 +1,14 @@
|
||||
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(/[ !’]/g, "")
|
||||
)
|
||||
}
|