mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
feat: add xcpcio
This commit is contained in:
8 files changed
+241
-26
No files matched your search
@@ -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);
|
||||
Reference in new issue
Block a user