feat: add xcpcio

This commit is contained in:
undefined committed 2024-11-13 11:31:35 +08:00
1 parent e1a9b14df5
commit 7f1a6a0f9a
8 files changed
+241 -26

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
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);