ant-app-builder
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -7,3 +7,3 @@ | ||
const copyRecursive = async (src, dest) => { | ||
const copyDir = async (src, dest) => { | ||
let list = await FS.readDir(src) | ||
@@ -20,3 +20,3 @@ | ||
if (!exists) await FS.mkdir(fDest) | ||
await copyRecursive(fSrc, fDest) | ||
await copyDir(fSrc, fDest) | ||
} else { | ||
@@ -28,2 +28,19 @@ await FS.copyFile(fSrc, fDest) | ||
const deleteDir = async (dir) => { | ||
let list = await FS.readDir(dir) | ||
await Promise.all(list.map(async file => { | ||
let fPath = FS.path.join(dir, file) | ||
let stat = await FS.fileStat(fPath) | ||
if (stat.isDirectory()) { | ||
await deleteDir(fPath) | ||
} else { | ||
await FS.unlink(fPath) | ||
} | ||
})) | ||
await FS.rmdir(dir) | ||
} | ||
const FS = { | ||
@@ -39,3 +56,4 @@ org: fs, | ||
copyFile: util.promisify(fs.copyFile), | ||
copyRecursive, | ||
copyDir, | ||
deleteDir, | ||
} | ||
@@ -42,0 +60,0 @@ |
{ | ||
"name": "ant-app-builder", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43520
215