Skip to content

Commit

Permalink
feat: first download ERC
Browse files Browse the repository at this point in the history
  • Loading branch information
snaildarter committed May 15, 2024
1 parent eebb80e commit 2a412ae
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,21 @@ export class AppService {
async downloadErcs() {
const paths = './ETH-ERCS/';
deleteFolder(paths);
download(
'direct:https://github.com/ethereum/ERCs.git',
'ETH-ERCS',
{ clone: true },
() => console.log('下载完成'),
);
return new Promise(function (res, rej) {
download(
'direct:https://github.com/ethereum/ERCs.git',
'ETH-ERCS',
{ clone: true },
function (err) {
if (err) {
rej(err);
} else {
res('download ERC success!');
console.log('下载完成');
}
},
);
});
}

async updateEips() {
Expand All @@ -266,6 +275,7 @@ export class AppService {
console.log('开始清理文件夹');
deleteFolder(paths);
console.log('清理文件夹成功');
await this.downloadErcs();
download(
'direct:https://github.com/ethereum/EIPs.git',
'ETH-EIPs',
Expand Down

0 comments on commit 2a412ae

Please sign in to comment.