(files: string[])
| 52 | }; |
| 53 | |
| 54 | const updateFiles = async (files: string[]) => { |
| 55 | const cwd = process.cwd(); |
| 56 | const tempDir = join(cwd, tempDirName); |
| 57 | |
| 58 | for (const file of files) { |
| 59 | const sourcePath = join(tempDir, file); |
| 60 | const destPath = join(cwd, file); |
| 61 | |
| 62 | await mkdir(dirname(destPath), { recursive: true }); |
| 63 | |
| 64 | await copyFile(sourcePath, destPath); |
| 65 | } |
| 66 | }; |
| 67 | |
| 68 | const deleteTemporaryDirectory = async () => |
| 69 | await rm(tempDirName, { recursive: true, force: true }); |