INNER CODE UNIT · TypeScript
copyEnvFiles
hypermodeinc/modus · cli/src/commands/dev/index.ts:383
async function copyEnvFiles(appPath: string, buildPath: string): Promise<void> {
for (const file of ENV_FILES) {
const src = path.join(appPath, file);
const dest = path.join(buildPath, file);
if (await fs.exists(src)) {
await fs.copyFile(src, dest);
} else if (await fs.exists(dest)) {
await fs.unlink(dest);
}
}
}