update templates

This commit is contained in:
Andrei Canta
2025-02-20 12:56:11 +02:00
parent 5fac760f2a
commit f57b86d84f
21 changed files with 323 additions and 56 deletions
+10
View File
@@ -72,6 +72,15 @@ async function renameFile(src, dest) {
await execa("mv", [src, dest]);
}
async function searchReplace(path, search, replace) {
console.log(`Searching and replacing ${search} with ${replace} in ${path}`);
const file = await fs.promises.readFile(path, "utf8");
const newFile = file.replaceAll(search, replace);
await fs.promises.writeFile(path, newFile);
}
export default {
cloneOrPullRepo,
removeContainerNames,
@@ -79,4 +88,5 @@ export default {
copyDir,
downloadFile,
renameFile,
searchReplace,
};