mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
13 lines
523 B
TypeScript
13 lines
523 B
TypeScript
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
const dist = path.join(path.dirname(require.resolve('@xcpcio/board-app/package.json')), 'dist');
|
|
const target = path.join(__dirname, 'public');
|
|
if (fs.existsSync(target)) {
|
|
fs.rmSync(target, { recursive: true });
|
|
}
|
|
fs.mkdirSync(target, { recursive: true });
|
|
fs.cpSync(path.join(dist, 'assets'), path.join(target, 'assets'), { recursive: true });
|
|
fs.cpSync(path.join(dist, 'index.html'), path.join(target, 'assets/board.html'));
|
|
console.log('Copied board app to', target);
|