yangyin
2024-09-05 2acdee4651d3bf785a3501287b40964f83a56a0e
Merge branch 'master' of http://47.103.154.90:83/r/WI/Web.Admin.V1.0
已修改2个文件
37 ■■■■ 文件已修改
scripts/build.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
scripts/helper.js 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
scripts/build.js
@@ -27,20 +27,6 @@
copyFile();
// 复制amis-editor 到 public文件夹中
const amisEditorPath = path.join(rootDir,'amis-editor');
const targetPath = path.join(publicDir,'amis-editor')
const isExist = fs.pathExistsSync(amisEditorPath);
if(!isExist){
    logWarn('amis-editor 不存在!');
}else{
    const isExist = fs.pathExistsSync(targetPath);
    if(!isExist){
        fs.mkdirSync(targetPath);
    }
    const res = fs.copySync(amisEditorPath,targetPath)
    res ?? logSuccess('========= 已集成 amis-editor =========')
}
// 更改 import.meta.glob
updateImportGlob();
scripts/helper.js
@@ -15,7 +15,7 @@
const customerProjectListDir = path.join(rootDir, 'src', 'views', 'project');
const firstCustomerName = customerList[0]?.split(':')[0];
/** 公共文件夹,所有客户文件夹共享文件 */
const commonDir = path.join(customerListDir,'common')
const commonDir = path.join(customerListDir, 'common');
const homeDir = os.homedir();
// const deployEnv = process.argv[3];
@@ -31,7 +31,6 @@
const logSuccess = (text) => {
    logColor(text, 'green');
};
const logWarn = (text) => {
    logColor(text, 'yellow');
@@ -190,6 +189,23 @@
    return format;
};
const copyAmisEditor = () => {
    // 复制amis-editor 到 public文件夹中
    const amisEditorPath = path.join(rootDir, 'amis-editor');
    const targetPath = path.join(publicDir, 'amis-editor');
    const isExist = fs.pathExistsSync(amisEditorPath);
    if (!isExist) {
        logWarn('amis-editor 不存在!');
    } else {
        const isExist = fs.pathExistsSync(targetPath);
        if (!isExist) {
            fs.mkdirSync(targetPath);
        }
        const res = fs.copySync(amisEditorPath, targetPath);
        res ?? logSuccess('========= 已集成 amis-editor =========');
    }
};
/**
 * 复制文件到 public 文件夹中
 * (只能复制一个客户文件配置)
@@ -216,7 +232,8 @@
    const customerDir = path.join(customerListDir, firstCustomerName);
    // 复制源文件夹中的所有文件到 public 文件夹
    fs.copySync(customerDir, publicDir, { filter });
    fs.copySync(commonDir,publicDir);
    fs.copySync(commonDir, publicDir);
    copyAmisEditor();
}
/**