From cbf3e642d086cf510e6101f4da04ce1845b15dfa Mon Sep 17 00:00:00 2001 From: carlhong Date: Tue, 28 May 2024 13:38:14 +0800 Subject: [PATCH] refactor: use gcp img instead of inline img to reduce package size --- .npmignore | 6 +++++- README.md | 6 ++++++ index.js | 8 ++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.npmignore b/.npmignore index 7e45438..d20bf6e 100644 --- a/.npmignore +++ b/.npmignore @@ -1 +1,5 @@ -assets/registry/* \ No newline at end of file +assets/* +networks/* +.github/* +.parcel-cache/* +api.json \ No newline at end of file diff --git a/README.md b/README.md index 82e449b..4d20128 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ This repo contains info of projects used in [Subscan parachain module](https://rococo.subscan.io/auction_board) based on [@polkadot/apps-config](https://github.com/polkadot-js/apps/tree/master/packages/apps-config). +## Changelog + +### 2.2.0 + +Refactor: use gcp img instead of inline img to reduce package size + ## Notice - The data will be displayed in Subscan([EG-1](https://kusama.subscan.io/parachain/2000?tab=project), [EG-2](https://kusama.subscan.io/crowdloan/2012-3?tab=project)), please be sure to fill in the real information. It is recommended to use the github account of the project member to submit. diff --git a/index.js b/index.js index d047579..305f242 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,7 @@ kusamaJsons.keys().forEach((k) => { const imageName = logoPaths[logoPaths.length - 1]; kusamaParachains[ c.data.ParaID - ].logo = require(`./assets/images/${imageName}`); + ].logo = `https://gcs.subscan.io/projects-info/images/${imageName}`; } catch {} } }); @@ -25,7 +25,7 @@ polkadotJsons.keys().forEach((k) => { const imageName = logoPaths[logoPaths.length - 1]; polkadotParachains[ c.data.ParaID - ].logo = require(`./assets/images/${imageName}`); + ].logo = `https://gcs.subscan.io/projects-info/images/${imageName}`; } catch {} } }); @@ -41,7 +41,7 @@ rococoJsons.keys().forEach((k) => { const imageName = logoPaths[logoPaths.length - 1]; rococoParachains[ c.data.ParaID - ].logo = require(`./assets/images/${imageName}`); + ].logo = `https://gcs.subscan.io/projects-info/images/${imageName}`; } catch {} } }); @@ -57,7 +57,7 @@ westendJsons.keys().forEach((k) => { const imageName = logoPaths[logoPaths.length - 1]; westendParachains[ c.data.ParaID - ].logo = require(`./assets/images/${imageName}`); + ].logo = `https://gcs.subscan.io/projects-info/images/${imageName}`; } catch {} } });