bili-sapp-cli
Advanced tools
Comparing version 0.1.16-mall-dev-20200826-01 to 0.1.16-mall-dev-20200826-02
@@ -20,3 +20,3 @@ const fs = require('fs'); | ||
absoluteFilePath = ''; | ||
if (index > -1) { | ||
@@ -92,3 +92,3 @@ absoluteFilePath = filePath.slice(index + rootPath.length); | ||
}; | ||
if (err) { | ||
@@ -99,3 +99,3 @@ process.exitCode = 1; | ||
} | ||
files.forEach(function (file) { | ||
@@ -109,7 +109,7 @@ var srcPath = path.join(srcDir, file); | ||
} | ||
fs.stat(srcPath, function (err, stats) { | ||
if (stats.isDirectory()) { | ||
const srcArray = srcPath.split('/'); | ||
if (srcArray[srcArray.length - 1] === '.git') { | ||
@@ -119,3 +119,3 @@ checkEnd(); | ||
} | ||
fs.mkdir(tarPath, function (err) { | ||
@@ -127,3 +127,3 @@ // 忽略文件夹已存在的情况,mac:-17,windows:-4075 | ||
} | ||
copyFolder(srcPath, tarPath, checkEnd, fileCompleteCallback, shouldCopyFile); | ||
@@ -136,5 +136,8 @@ }); | ||
}); | ||
//为空时直接回调 | ||
files.length === 0 && cb && cb(); | ||
if (files.length === 0) { | ||
cb && cb(); | ||
resolve() | ||
} | ||
}); | ||
@@ -147,3 +150,3 @@ }); | ||
var files = []; | ||
if (exceptPath !== path && fs.existsSync(path)) { | ||
@@ -153,4 +156,4 @@ files = fs.readdirSync(path); | ||
var curPath = path + '/' + file; | ||
if (fs.statSync(curPath).isDirectory()) { | ||
@@ -247,2 +250,2 @@ deleteFolder(curPath, exceptPath); | ||
mkdirsSync | ||
}; | ||
}; |
{ | ||
"name": "bili-sapp-cli", | ||
"version": "0.1.16-mall-dev-20200826-01", | ||
"version": "0.1.16-mall-dev-20200826-02", | ||
"description": "Bilibili Small App Cli", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
558580
11790
2