feat(showcase): add operator voice

This commit is contained in:
Haoyu Xu
2023-02-10 17:54:14 -05:00
parent 36afd6d786
commit 59f113e741
10 changed files with 123 additions and 34 deletions

View File

@@ -53,6 +53,15 @@ export async function copy(sourcePath, targetPath) {
return await fsP.copyFile(sourcePath, targetPath)
}
export async function copyDir(sourcePath, targetPath) {
if (!exists(sourcePath)) {
console.warn(`Source file ${sourcePath} does not exist.`)
return
}
mkdir(targetPath)
return await fsP.cp(sourcePath, targetPath, { recursive: true })
}
export function appendSync(content, filePath) {
return fs.appendFileSync(filePath, content, 'utf8');
}