mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-02 14:56:38 +08:00
[优化] 改名
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { cpSync, existsSync, mkdirSync, rmSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
const root = process.cwd();
|
||||
const outDir = resolve(root, 'out');
|
||||
const buildDir = resolve(root, 'build');
|
||||
|
||||
if (!existsSync(outDir)) {
|
||||
throw new Error('Missing Next.js export output: out/');
|
||||
}
|
||||
|
||||
rmSync(buildDir, { recursive: true, force: true });
|
||||
mkdirSync(buildDir, { recursive: true });
|
||||
cpSync(outDir, buildDir, { recursive: true });
|
||||
Reference in New Issue
Block a user