Exclude hidden assets from builds and record deployment checks
showcase/deploy Live at https://showcase.andrefiedler.de/2608_BuB/

This commit is contained in:
André Fiedler
2026-09-07 17:32:00 +02:00
parent 0712615dfa
commit 4f64b3eda7
2 changed files with 14 additions and 2 deletions
+5 -1
View File
@@ -1,5 +1,6 @@
import { cp, mkdir, rm } from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import { basename } from 'node:path';
const root = new URL('../', import.meta.url);
const output = new URL('dist/', root);
@@ -8,6 +9,9 @@ const publicFiles = ['index.html', 'assets', 'favicon.ico', 'favicon.svg', 'site
await rm(output, { recursive: true, force: true });
await mkdir(output, { recursive: true });
for (const filename of publicFiles) {
await cp(new URL(filename, root), new URL(filename, output), { recursive: true });
await cp(new URL(filename, root), new URL(filename, output), {
recursive: true,
filter: (source) => !basename(source).startsWith('.'),
});
}
console.log(`Static site built at ${fileURLToPath(output)}`);