ref: 功能优化

This commit is contained in:
muwoo
2021-06-15 16:10:16 +08:00
parent d0e489c36a
commit 3446b294ac
16 changed files with 58 additions and 48 deletions

View File

@@ -44,7 +44,8 @@ function mkdirFolder(name) {
});
}
function downloadFunc(downloadRepoUrl, name) {
function downloadFunc(downloadRepoUrl, name, gitUrl) {
const targetGit = gitUrl ? gitUrl : `github:clouDr-f2e/${name}`;
const plugin_path = path.join(__static, './plugins');
return new Promise(async (resolve, reject) => {
@@ -59,7 +60,7 @@ function downloadFunc(downloadRepoUrl, name) {
await process.execSync(`rm -rf ${temp_dest}`);
}
download(`github:clouDr-f2e/${name}`, temp_dest, function (err) {
download(targetGit, temp_dest, function (err) {
console.log(err ? 'Error' : 'Success')
if (err) {
console.log(err);