mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-01-17 23:51:08 +03:00
Merge pull request #1597 from simple-icons/develop
Release 4 new icons and 1 other changes
This commit is contained in:
commit
01baf4953a
17
.gitattributes
vendored
Normal file
17
.gitattributes
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
* text=auto
|
||||
|
||||
# SVGs are treated as binary by default
|
||||
*.svg text
|
||||
|
||||
# Don't diff machine generated files
|
||||
package-lock.json -diff
|
||||
|
||||
# Treat images as binary
|
||||
*.ico binary
|
||||
*.png binary
|
||||
|
||||
# Don't export/archive these files
|
||||
.github export-ignore
|
||||
.gitpod.yml export-ignore
|
||||
.travis.yml export-ignore
|
||||
CNAME export-ignore
|
15
.travis.yml
15
.travis.yml
@ -22,7 +22,20 @@ jobs:
|
||||
- npm run test
|
||||
|
||||
- stage: deploy
|
||||
name: "NPM Package"
|
||||
name: "Git tag"
|
||||
language: minimal
|
||||
if: branch = master
|
||||
|
||||
before_deploy:
|
||||
- git config --local user.name "$GITHUB_USERNAME"
|
||||
- git config --local user.email "$GITHUB_EMAIL"
|
||||
- export PACKAGE_VERSION=$(cat package.json | grep 'version' | sed 's/[ \",:]//g' | sed 's/version//')
|
||||
- git tag $PACKAGE_VERSION
|
||||
deploy:
|
||||
provider: releases
|
||||
api_key: "$GITHUB_TOKEN"
|
||||
skip_cleanup: true
|
||||
- name: "NPM Package"
|
||||
language: node_js
|
||||
node_js: 8
|
||||
if: branch = master
|
||||
|
@ -665,6 +665,11 @@
|
||||
"hex": "A81D33",
|
||||
"source": "https://www.debian.org/logos"
|
||||
},
|
||||
{
|
||||
"title": "deepin",
|
||||
"hex": "007CFF",
|
||||
"source": "https://commons.wikimedia.org/wiki/File:Deepin_logo.svg"
|
||||
},
|
||||
{
|
||||
"title": "Deezer",
|
||||
"hex": "00C7F2",
|
||||
@ -1500,6 +1505,11 @@
|
||||
"hex": "C21325",
|
||||
"source": "https://jestjs.io/"
|
||||
},
|
||||
{
|
||||
"title": "JET",
|
||||
"hex": "FBBA00",
|
||||
"source": "https://de.wikipedia.org/wiki/Datei:JET.svg"
|
||||
},
|
||||
{
|
||||
"title": "Jira",
|
||||
"hex": "172B4D",
|
||||
@ -2390,6 +2400,11 @@
|
||||
"hex": "8CA1AF",
|
||||
"source": "https://github.com/rtfd/readthedocs.org/blob/master/media/readthedocsbranding.ai"
|
||||
},
|
||||
{
|
||||
"title": "Realm",
|
||||
"hex": "39477F",
|
||||
"source": "https://realm.io/press"
|
||||
},
|
||||
{
|
||||
"title": "Reason",
|
||||
"hex": "DD4B39",
|
||||
@ -2645,6 +2660,11 @@
|
||||
"hex": "000000",
|
||||
"source": "https://blog.society6.com/app/themes/society6/dist/images/mark.svg"
|
||||
},
|
||||
{
|
||||
"title": "Socket.io",
|
||||
"hex": "010101",
|
||||
"source": "https://socket.io"
|
||||
},
|
||||
{
|
||||
"title": "Sogou",
|
||||
"hex": "FB6022",
|
||||
|
1
icons/deepin.svg
Normal file
1
icons/deepin.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>deepin icon</title><path d="M16.104.696c-1.724-.63-3.49-.8-5.205-.64-1.988.157-2.958.772-2.9.661-3.251 1.16-6 3.657-7.272 7.157-2.266 6.234.944 13.128 7.168 15.398 6.228 2.27 13.111-.945 15.378-7.179C25.54 9.86 22.33 2.966 16.104.696zM8.305 22.145a10.767 10.767 0 0 1-1.867-.904c2.9.223 6.686-.445 9.239-2.834 0 0 4.866-3.888 1.345-10.269 0 0 .568 2.572-.156 4.687 0 0-.69 2.877-3.757 3.712-4.517 1.231-9.664-1.93-11.816-3.463-.162-1.574-.018-3.2.56-4.788.855-2.352 2.463-4.188 4.427-5.42-.49 3.436-.102 6.6.456 7.925.749 1.777 2.05 3.85 4.59 4.115 2.54.267 3.94-2.11 3.94-2.11 1.304-1.98 1.508-4.823 1.488-4.892-.02-.07-.347-.257-.347-.257-.877 3.549-2.323 4.734-2.323 4.734-2.28 2.201-3.895.675-3.895.675-1.736-1.865-.52-4.895-.52-4.895.68-2.064 2.66-5.084 4.905-6.62.374.092.75.15 1.12.284a10.712 10.712 0 0 1 3.554 2.16c-1.641.599-4.291 1.865-4.291 1.865-4.201 1.77-4.485 4.446-4.485 4.446-.435 2.758 1.754 1.59 1.754 1.59 2.252-1.097 3.359-4.516 3.359-4.516-.703-.134-1.257.08-1.257.08-.899 2.22-2.733 3.132-2.733 3.132-.722.382-.89-.293-.89-.293-.122-.506.522-.592.522-.592 1-.389 1.639-1.439 1.784-1.868.144-.43.412-.464.412-.464a12.998 12.998 0 0 1 2.619-.535c1.7-.209 4.303.602 4.303.602.584.235 1.144.41 1.641.551.954 2.384 1.105 5.098.16 7.7-2.039 5.61-8.236 8.504-13.841 6.462z" /></svg>
|
After Width: | Height: | Size: 1.3 KiB |
1
icons/jet.svg
Normal file
1
icons/jet.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>JET icon</title><path d="M15.778 19.044c3.048-.498 4.755-.73 8.219-2.395L24 13.81c-3.228 3.225-9.249 5.146-15.07 5.098-.75-.01-1.948.017-2.246-.024 3.1.49 6.18.556 9.094.159M3.836 15.764c.75.003 1.805-.014 2.403-.394.535-.467.93-1.106 1.247-1.828l1.545-4.697-2.157.013-1.199 3.664c-.225 1.161-.943 1.566-1.483 1.483l-1.354-.097-.515 1.676 1.513.18m13.29-.104l1.672-5.074h2.44l.543-1.665-5.907-.01-.556 1.662H16.6l-1.73 5.077 2.257.01m-3.859-.024l.564-1.718h-3.204l.297-.909h2.668l.543-1.641h-2.661l.262-.81h3.08l.57-1.713-5.267.027-2.205 6.757 5.353.007m1.245-9.809c1.883-.072 3.743.083 5.969.277-2.192-.809-5.7-1.407-8.344-1.407-4.344 0-8.644 1.054-12.117 2.675L0 11.07c3.321-3.387 9.114-5.298 14.513-5.243"/></svg>
|
After Width: | Height: | Size: 794 B |
1
icons/realm.svg
Normal file
1
icons/realm.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Realm icon</title><path d="M12.004.059A12.122 12.122 0 0 0 3.52 3.564v.002C1.295 5.79.004 8.887.004 12.03c0 3.142 1.285 6.244 3.516 8.465l.001.002A12.168 12.168 0 0 0 12 24.002h.004c3.148 0 6.255-1.283 8.482-3.508l.002-.002a12.08 12.08 0 0 0 3.516-8.457v-.004c0-3.141-1.287-6.243-3.518-8.465A12.116 12.116 0 0 0 12.004.06zm0 1.336c.48 0 .96.046 1.435.113-2.03.566-3.765 1.622-5.554 1.949a7.352 7.352 0 0 1-2.225.045c1.826-1.338 4.084-2.107 6.344-2.107zm4.135 1.072c.173 0 .348.011.521.023a10.59 10.59 0 0 1 2.883 2.022c.092.091.173.194.262.289a10.278 10.278 0 0 1-4.442 1.178c-2.43.06-4.958-.794-7.69-.823a12.662 12.662 0 0 0-4.362.744c.32-.457.672-.893 1.062-1.293 1.223.322 2.5.39 3.748.164h.002c2.264-.412 4.133-1.625 6.049-2.08a8.342 8.342 0 0 1 1.967-.224zm4.535 3.404a10.87 10.87 0 0 1 1.433 2.824c-.435-.243-.884-.46-1.35-.644h-.001a11.305 11.305 0 0 0-6.62-.492h-.003c-1.489.344-2.841.967-4.154 1.523-.468.198-.933.383-1.399.553a10.83 10.83 0 0 0-1.445-.256h-.002a9.578 9.578 0 0 0-4.194.549 8.125 8.125 0 0 1-1.244-.535 10.9 10.9 0 0 1 .53-1.557c1.671-.877 3.552-1.364 5.433-1.344 2.445.026 4.992.89 7.738.822h.004a11.626 11.626 0 0 0 5.274-1.443zm-4.031 2.742c1.233 0 2.463.229 3.625.682a9.895 9.895 0 0 1 2.283 1.281c.036.252.064.504.082.758-.734-.187-1.488-.3-2.244-.328a10.28 10.28 0 0 0-3.201.38c-.697.198-1.353.463-1.989.759-1.087-.371-2.166-.86-3.277-1.336a35.107 35.107 0 0 0-1.324-.538c1.3-.552 2.554-1.113 3.834-1.41a9.968 9.968 0 0 1 2.21-.248zM5.877 10.676c.374-.016.75-.005 1.125.031 1.475.148 2.935.704 4.393 1.33.717.309 1.453.625 2.203.928-1.1.604-2.156 1.225-3.237 1.701-1.05-.394-2.131-.758-3.302-.918-1.835-.25-3.717.06-5.387.828a10.467 10.467 0 0 1-.32-2.3c.403-.3.828-.57 1.28-.79a8.264 8.264 0 0 1 3.245-.81zm14.463 1.666c.775.029 1.547.16 2.29.379a10.709 10.709 0 0 1-.304 1.894c-.67.438-1.383.807-2.139 1.08-1.828.657-3.85.79-5.75.373-.78-.17-1.557-.45-2.341-.75 1.889-.973 3.598-2.119 5.457-2.646h.002a8.954 8.954 0 0 1 2.785-.33zM5.508 15.006c.458-.016.916.005 1.369.066 2.354.322 4.617 1.718 7.275 2.301.357.078.717.134 1.078.178-.35.1-.698.21-1.043.332v.002h-.001c-1.283.462-2.455 1.042-3.637 1.388-2.151.625-4.443.54-6.543-.23a10.723 10.723 0 0 1-1.926-3.18 8.615 8.615 0 0 1 3.428-.857zm16.144 1.5c-.067.145-.133.291-.207.433-.221-.017-.442-.039-.664-.048.298-.112.584-.251.871-.385zm-1.7 1.703c.231-.001.464.007.696.016-.333.465-.696.912-1.105 1.324h-.002v.002c-1.966 1.963-4.754 3.113-7.535 3.113a10.814 10.814 0 0 1-5.793-1.725c1.57.189 3.173.065 4.71-.382h.003c1.332-.391 2.526-.987 3.71-1.414a16.091 16.091 0 0 1 5.315-.934z"/></svg>
|
After Width: | Height: | Size: 2.6 KiB |
1
icons/socket-dot-io.svg
Normal file
1
icons/socket-dot-io.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Socket.io icon</title><path d="M11.936.016a12.17 12.17 0 0 0-2.975.378C4.281 1.557.567 5.797.091 10.604c-.59 4.549 1.708 9.286 5.644 11.635 3.861 2.418 9.093 2.32 12.874-.223 3.397-2.206 5.512-6.228 5.386-10.285-.058-4.016-2.31-7.917-5.759-9.98C16.354.59 14.143.007 11.936.016zm-.063 1.696c4.945-.007 9.789 3.814 10.282 8.925.945 5.66-3.753 11.413-9.488 11.58-5.454.544-10.725-4.08-10.88-9.557C1.38 8.226 4.303 3.825 8.485 2.36a9.113 9.113 0 0 1 3.388-.647zm5.091 3.225c-2.687 2.085-5.26 4.308-7.889 6.457 1.203.017 2.412.016 3.621.01 1.41-2.165 2.859-4.301 4.268-6.467zm-5.665 7.654c-1.41 2.166-2.86 4.309-4.27 6.474 2.693-2.08 5.255-4.32 7.902-6.456a255.425 255.425 0 0 0-3.632-.018z"/></svg>
|
After Width: | Height: | Size: 772 B |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "simple-icons",
|
||||
"version": "1.13.0",
|
||||
"version": "1.14.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "simple-icons",
|
||||
"version": "1.13.0",
|
||||
"version": "1.14.0",
|
||||
"description": "SVG icons for popular brands https://simpleicons.org",
|
||||
"homepage": "https://www.simpleicons.org",
|
||||
"keywords": [
|
||||
|
@ -11,10 +11,17 @@ const fs = require("fs");
|
||||
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 indexTemplateFile = `${__dirname}/templates/index.js`;
|
||||
const iconObjectTemplateFile = `${__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");
|
||||
@ -27,27 +34,37 @@ function iconToKeyValue(icon) {
|
||||
return `'${icon.title}':${iconToObject(icon)}`;
|
||||
}
|
||||
function iconToObject(icon) {
|
||||
return `{title:'${escape(icon.title)}',slug:'${escape(icon.slug)}',svg:'${escape(icon.svg)}',get path(){return this.svg.match(/<path\\s+d="([^"]*)/)[1];},source:'${escape(icon.source)}',hex:'${icon.hex}'}`;
|
||||
return util.format(iconObjectTemplate,
|
||||
escape(icon.title),
|
||||
escape(icon.slug),
|
||||
escape(icon.svg),
|
||||
escape(icon.source),
|
||||
escape(icon.hex)
|
||||
);
|
||||
}
|
||||
|
||||
// 'main'
|
||||
const icons = [];
|
||||
data.icons.forEach(icon => {
|
||||
const filename = titleToFilename(icon.title);
|
||||
icon.svg = fs.readFileSync(`${iconsDir}/${filename}.svg`, "utf8");
|
||||
icon.svg = fs.readFileSync(`${iconsDir}/${filename}.svg`, UTF8);
|
||||
icon.slug = filename;
|
||||
icons.push(icon)
|
||||
icons.push(icon);
|
||||
|
||||
// write the static .js file for the icon
|
||||
fs.writeFileSync(
|
||||
`${iconsDir}/${filename}.js`,
|
||||
`module.exports=${iconToObject(icon)};`
|
||||
);
|
||||
const { error, code } = minify(`module.exports=${iconToObject(icon)};`);
|
||||
if (error) {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
} else {
|
||||
fs.writeFileSync(`${iconsDir}/${filename}.js`, code);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// write our generic index.js
|
||||
const indexTemplate = fs.readFileSync(indexTemplateFile, "utf8");
|
||||
const { error, code } = minify(util.format(indexTemplate, icons.map(iconToKeyValue).join(',')));
|
||||
const rawIndexJs = util.format(indexTemplate, icons.map(iconToKeyValue).join(','));
|
||||
const { error, code } = minify(rawIndexJs);
|
||||
if (error) {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
|
10
scripts/templates/icon-object.js
Normal file
10
scripts/templates/icon-object.js
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
title: '%s',
|
||||
slug: '%s',
|
||||
svg: '%s',
|
||||
get path() {
|
||||
return this.svg.match(/<path\s+d="([^"]*)/)[1];
|
||||
},
|
||||
source: '%s',
|
||||
hex: '%s',
|
||||
}
|
Loading…
Reference in New Issue
Block a user