更新12个教务系统并优化项目大小
主要更新: - 更新所有12个产业的教务系统数据和功能 - 删除所有 node_modules 文件夹(节省3.7GB) - 删除所有 .yoyo 缓存文件夹(节省1.2GB) - 删除所有 dist 构建文件(节省55MB) 项目优化: - 项目大小从 8.1GB 减少到 3.2GB(节省60%空间) - 保留完整的源代码和配置文件 - .gitignore 已配置,防止再次提交大文件 启动脚本: - start-industry.sh/bat/ps1 脚本会自动检测并安装依赖 - 首次启动时自动运行 npm install - 支持单个或批量启动产业系统 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
45
frontend/verify_homework_structure.cjs
Normal file
45
frontend/verify_homework_structure.cjs
Normal file
@@ -0,0 +1,45 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
// 读取 mockData.js 并提取 homework 数据
|
||||
const mockDataPath = path.join(__dirname, 'src/data/mockData.js');
|
||||
const mockDataContent = fs.readFileSync(mockDataPath, 'utf-8');
|
||||
|
||||
// 简单验证关键结构
|
||||
const checks = {
|
||||
'复合能力课存在': /name: "复合能力课"/.test(mockDataContent),
|
||||
'垂直能力课存在': /name: "垂直能力课"/.test(mockDataContent),
|
||||
'复合能力课有list字段': /name: "复合能力课"[^]*?list: \[/.test(mockDataContent),
|
||||
'垂直能力课有list字段': /name: "垂直能力课"[^]*?list: \[/.test(mockDataContent),
|
||||
'复合能力课有units字段': /name: "复合能力课"[^]*?units: \[/.test(mockDataContent),
|
||||
'垂直能力课有units字段': /name: "垂直能力课"[^]*?units: \[/.test(mockDataContent),
|
||||
'展会主题与品牌定位有isShowCase标记': /name: "展会主题与品牌定位".*isShowCase: true/.test(mockDataContent)
|
||||
};
|
||||
|
||||
console.log('===== homework 数据结构验证 =====\n');
|
||||
|
||||
let allPassed = true;
|
||||
Object.entries(checks).forEach(([checkName, result]) => {
|
||||
const status = result ? '✅' : '❌';
|
||||
console.log(`${status} ${checkName}`);
|
||||
if (!result) allPassed = false;
|
||||
});
|
||||
|
||||
console.log('\n===== 课程数量统计 =====\n');
|
||||
|
||||
// 统计 list 中的课程数量
|
||||
const compoundListMatch = mockDataContent.match(/name: "复合能力课"[\s\S]*?list: \[([\s\S]*?)\]\s*\}/);
|
||||
const verticalListMatch = mockDataContent.match(/name: "垂直能力课"[\s\S]*?list: \[([\s\S]*?)\]\s*\}/);
|
||||
|
||||
if (compoundListMatch) {
|
||||
const compoundCourses = (compoundListMatch[1].match(/\{ id:/g) || []).length;
|
||||
console.log(`复合能力课 list 中的课程数: ${compoundCourses}`);
|
||||
}
|
||||
|
||||
if (verticalListMatch) {
|
||||
const verticalCourses = (verticalListMatch[1].match(/\{ id:/g) || []).length;
|
||||
console.log(`垂直能力课 list 中的课程数: ${verticalCourses}`);
|
||||
}
|
||||
|
||||
console.log('\n===== 总结 =====\n');
|
||||
console.log(allPassed ? '✅ 所有检查通过!' : '❌ 存在问题,请检查上述失败项');
|
||||
Reference in New Issue
Block a user