14 lines
610 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { cp, mkdir, rm } from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import { applications, validateApplications } from '../src/apps.mjs';
validateApplications(applications);
const root = new URL('../', import.meta.url);
const output = new URL('dist/', root);
await rm(output, { recursive: true, force: true });
await mkdir(output, { recursive: true });
for (const name of ['index.html', 'favicon.svg', 'src']) {
await cp(new URL(name, root), new URL(name, output), { recursive: true });
}
console.log(`构建成功:${fileURLToPath(output)}(${applications.length} 个应用)`);