1 Star 0 Fork 27

陈天 / 快验网络验证系统前端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.js 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
暗月隐落 提交于 2023-08-13 19:22 . 表格增加自动本地保存列宽
//打包预构建,删除编译目录下,含子目录后缀非.go的文件
import fs from 'fs';
import path from 'path';
const distPath = 'E:\\yun\\xuhaonan\\project\\TY通用后台管理系统\\server2\\core\\dist\\VueAdmin';
if (fs.existsSync(distPath)) {
fs.readdirSync(distPath).forEach((file) => {
const filePath = path.join(distPath, file);
const isGoFile = file.endsWith('.go');
if (!isGoFile) {
if (fs.lstatSync(filePath).isDirectory()) {
deleteNonGoFiles(filePath);
} else {
fs.unlinkSync(filePath);
}
}
});
}
function deleteNonGoFiles(directoryPath) {
fs.readdirSync(directoryPath).forEach((file) => {
const filePath = path.join(directoryPath, file);
const isGoFile = file.endsWith('.go');
if (!isGoFile) {
if (fs.lstatSync(filePath).isDirectory()) {
deleteNonGoFiles(filePath);
} else {
fs.unlinkSync(filePath);
}
}
});
//fs.rmdirSync(directoryPath);
}
1
https://gitee.com/hakwolf/KuaiYanWeb.git
git@gitee.com:hakwolf/KuaiYanWeb.git
hakwolf
KuaiYanWeb
快验网络验证系统前端
码云快验web

搜索帮助