Deploy / validate-dispatch (push) Successful in 43s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
24 lines
538 B
JavaScript
24 lines
538 B
JavaScript
import fs from "node:fs";
|
|
import path from "node:path";
|
|
|
|
const PUBLIC_DIR = path.resolve(import.meta.dirname, "../public");
|
|
|
|
function cleanDotfiles(directory) {
|
|
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
|
|
const fullPath = path.join(directory, entry.name);
|
|
|
|
if (entry.isDirectory()) {
|
|
cleanDotfiles(fullPath);
|
|
continue;
|
|
}
|
|
|
|
if (entry.isFile() && entry.name === ".DS_Store") {
|
|
fs.rmSync(fullPath);
|
|
}
|
|
}
|
|
}
|
|
|
|
if (fs.existsSync(PUBLIC_DIR)) {
|
|
cleanDotfiles(PUBLIC_DIR);
|
|
}
|