mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
Co-authored-by: wlwxj <d1ve_wh4le@outlook.com> Co-authored-by: Rbqwow <55343783+Rbqwow@users.noreply.github.com> Co-authored-by: Constrat <56174894+Constrat@users.noreply.github.com> Co-authored-by: HX3N <scarlet7518@gmail.com> Co-authored-by: Wallsman <63186641+wallsman@users.noreply.github.com> Co-authored-by: Loong <wangl.cc@outlook.com> Co-authored-by: 神代綺凛 <i@loli.best> Co-authored-by: SherkeyXD <57581480+SherkeyXD@users.noreply.github.com>
31 lines
728 B
JavaScript
31 lines
728 B
JavaScript
import * as fs from 'fs';
|
|
|
|
const bundleBasePath = './dist';
|
|
|
|
const maaProjectLocationMapping = [
|
|
{
|
|
from: './apps/web/dist',
|
|
to: `${bundleBasePath}`,
|
|
},
|
|
{
|
|
from: '../docs/.vuepress/dist',
|
|
to: `${bundleBasePath}/docs`,
|
|
},
|
|
{
|
|
from: '../docs/staticwebapp.config.json',
|
|
to: `${bundleBasePath}/docs/staticwebapp.config.json`,
|
|
},
|
|
];
|
|
|
|
console.log(`remove ${bundleBasePath}`);
|
|
fs.rmSync(bundleBasePath, { recursive: true, force: true });
|
|
|
|
maaProjectLocationMapping.forEach(({ from, to }) => {
|
|
if (fs.existsSync(from) === false) {
|
|
console.error(`[ERR] ${from} does not exist`);
|
|
process.exit(-1);
|
|
}
|
|
console.log(`[INF] copy ${from} to ${to}`);
|
|
fs.cpSync(from, to, { recursive: true });
|
|
});
|