Files
MaaAssistantArknights/website/bundler.mjs
Rbqwow 3bb0833704 build: 更新文档主题库 (#11627)
* build: 更新网站依赖

* build:更新vphope版本

* build: 怎么忘记加这个了

* fix: 修复构建错误

* chore: fix Vite CJS Node API deprecated warning

* chore: log

* perf: turbo 添加文档 cache

* perf: 注释掉新版不读取的切换语言公告内容

但公告这个属性得留着 不留着就没有切换语言的弹窗了

* fix: 修复字体问题

* build: update package version

* docs: remove root locale

* docs: add author

* ci: update node version

* build: turbo一直叫我更新,于是我更新了

* docs: update package

* docs: 再见吧牛牛今晚我就要远航

* docs: fix root locale problem

* docs: remove unused command

* feat: 牛兮归来!

* build: update turbo

* chore: 语言提醒怎么又没了 加回来

---------

Co-authored-by: SherkeyXD <57581480+SherkeyXD@users.noreply.github.com>
2025-04-09 21:09:31 +08:00

31 lines
736 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(`[INF] Removing ${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 });
});