From 1b80ed3f8202d8fc816f893bec7480b4fd1fb85c Mon Sep 17 00:00:00 2001 From: Amio Date: Fri, 27 Jul 2018 21:16:31 +0800 Subject: [PATCH] feat: fix icon whiten method --- libs/icons.js | 17 +++++++++++------ libs/icons/apple.svg | 5 +++++ libs/icons/appveyor.svg | 6 +++--- libs/icons/bitcoin.svg | 1 - libs/icons/github.svg | 2 +- libs/icons/gratipay.svg | 3 --- libs/icons/liberapay.svg | 1 - libs/icons/telegram.svg | 6 ------ 8 files changed, 20 insertions(+), 21 deletions(-) create mode 100644 libs/icons/apple.svg delete mode 100644 libs/icons/bitcoin.svg delete mode 100644 libs/icons/gratipay.svg delete mode 100644 libs/icons/liberapay.svg delete mode 100644 libs/icons/telegram.svg diff --git a/libs/icons.js b/libs/icons.js index 8196c0c..6dfea7d 100644 --- a/libs/icons.js +++ b/libs/icons.js @@ -1,7 +1,7 @@ const fs = require('fs') const { join, parse } = require('path') -function genIcons (iconFolder) { +function genIcons (iconFolder, whiten) { const icons = {} fs.readdirSync(join(__dirname, iconFolder)).forEach(filename => { @@ -14,10 +14,8 @@ function genIcons (iconFolder) { const key = parse(filename).name const iconFile = join(__dirname, iconFolder, filename) - const svg = fs.readFileSync(iconFile, 'utf8') - .replace(/fill="#\w{3,6}"/g, 'fill="white"') - .replace(/stroke="#\w{3,6}"/g, 'stroke="white"') - // .replace(/ + + + + diff --git a/libs/icons/appveyor.svg b/libs/icons/appveyor.svg index 7c36860..a1ca684 100644 --- a/libs/icons/appveyor.svg +++ b/libs/icons/appveyor.svg @@ -1,3 +1,3 @@ - - - \ No newline at end of file + + + diff --git a/libs/icons/bitcoin.svg b/libs/icons/bitcoin.svg deleted file mode 100644 index f636bee..0000000 --- a/libs/icons/bitcoin.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/icons/github.svg b/libs/icons/github.svg index 99e8eb5..21faf8d 100644 --- a/libs/icons/github.svg +++ b/libs/icons/github.svg @@ -1,3 +1,3 @@ - + diff --git a/libs/icons/gratipay.svg b/libs/icons/gratipay.svg deleted file mode 100644 index fcf505e..0000000 --- a/libs/icons/gratipay.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/libs/icons/liberapay.svg b/libs/icons/liberapay.svg deleted file mode 100644 index 4f5c5e4..0000000 --- a/libs/icons/liberapay.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/libs/icons/telegram.svg b/libs/icons/telegram.svg deleted file mode 100644 index 5713a26..0000000 --- a/libs/icons/telegram.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - -