Skip to content

Commit 8c126b9

Browse files
committed
new icons and updated scripts
1 parent d36e2ae commit 8c126b9

26 files changed

+305
-1687
lines changed

manifest.json

Lines changed: 1 addition & 1674 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@
4646
"prod": "cross-env NODE_ENV=production vue-cli-service build",
4747
"test:unit": "vue-cli-service test:unit",
4848
"test": "npm run test:unit",
49-
"update": "node scripts/fetchDetails.js",
50-
"new": "node scripts/newIcons.js"
49+
"update": "node -r esm scripts/updateManifest.js && node scripts/fetchDetails.js",
50+
"new": "node -r esm scripts/newIcons.js",
51+
"update:manifest": "node -r esm scripts/updateManifest.js"
5152
},
5253
"husky": {
5354
"hooks": {
@@ -73,6 +74,7 @@
7374
"eslint-loader": "^2.1.2",
7475
"eslint-plugin-prettier": "2.6.2",
7576
"eslint-plugin-vue": "^4.0.0",
77+
"esm": "^3.2.25",
7678
"husky": "^1.3.1",
7779
"node-sass": "^4.11.0",
7880
"prettier": "1.14.3",

scripts/newIcons.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
const currencies = require('./../manifest.json');
21
const updatedCurrencies = require('./../src/cryptoicons/manifest.json');
3-
2+
const currencies = require('./../src/icons').default;
43
const newCurrencies = updatedCurrencies.filter(
5-
o => !currencies.find(o2 => o.symbol === o2.symbol)
4+
o =>
5+
!currencies.find(o2 => o.symbol.toLowerCase() === o2.symbol.toLowerCase())
66
);
7+
78
console.log(newCurrencies);

scripts/updateManifest.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const fs = require('fs');
2+
const updatedCurrencies = require('./../src/cryptoicons/manifest.json');
3+
const currencies = require('./../src/icons').default;
4+
const newCurrencies = updatedCurrencies.filter(o =>
5+
currencies.find(o2 => o.symbol.toLowerCase() === o2.symbol.toLowerCase())
6+
);
7+
var stringifyData = JSON.stringify(newCurrencies);
8+
fs.writeFile('./manifest.json', stringifyData, 'utf8', function(err) {
9+
if (err) {
10+
return console.log(err);
11+
}
12+
console.log('The file was saved!');
13+
});

src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
tag="div"
6060
class="icon-wrapper">
6161
<div
62-
v-for="currency in filteredCurrencies"
63-
:key="currency.id+currency.symbol"
62+
v-for="(currency, index) in filteredCurrencies"
63+
:key="index+currency.symbol"
6464
:class="{'selected': isSelected(currency.symbol) > -1}"
6565
class="icon"
6666
@click="selectIcon(currency.symbol)" >

src/cryptoicons

src/data.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/icons/ampl.js

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/icons/bze.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const Bze = {
2+
symbol: 'Bze',
3+
color: '#000',
4+
plainIcon: c => {
5+
return `<path fill-rule="evenodd" fill="${
6+
c ? c : this.color
7+
}" d="M16 0c8.837 0 16 7.163 16 16s-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0zm-1.04 5.75h-3.627l-1.302 7.341h4.619l-5.487 4.947L8 24.695s4.387.124 8.107 0c3.735-.125 8.09-3.329 8.726-6.953.868-4.9-1.937-6.797-1.937-6.797l-2.542 2.489s2.139 2.38.17 5.646c-1.937 3.204-8.37 2.613-8.37 2.613l.496-2.815 9.052-8.835H14.2l.76-4.293zm5.967 4.588l-8.54 8.43-.574 3.22s1.907.14 3.41 0c1.504-.155 3.193-.777 3.193-.777l-4.464 3.25H8.264l1.116-6.315 5.905-5.319h-5.022l4.061-2.489h6.603z"/>`;
8+
},
9+
colorIcon() {
10+
return `<g fill="none"><circle fill="#00AEEF" cx="16" cy="16" r="16"/><path d="M13.952 24.461H8.264l1.116-6.315 5.905-5.319h-5.022l4.061-2.489h6.603l-8.54 8.43-.574 3.22s1.907.14 3.41 0c1.504-.155 3.193-.777 3.193-.777l-4.464 3.25zm8.944-13.516l-2.542 2.489s2.139 2.38.17 5.646c-1.937 3.204-8.37 2.613-8.37 2.613l.496-2.815 9.052-8.835H14.2l.76-4.293h-3.627l-1.302 7.341h4.619l-5.487 4.947L8 24.695s4.387.124 8.107 0c3.735-.125 8.09-3.329 8.726-6.953.868-4.9-1.937-6.797-1.937-6.797z" fill="#FFF"/></g>`;
11+
}
12+
};
13+
export default Bze;

src/icons/d.js

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)