"添加前端模板和运行代码模块"

This commit is contained in:
Codex
2026-06-01 13:43:09 +08:00
parent 24045274ad
commit 8092c4b1f8
587 changed files with 99761 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env node
const { execSync } = require('child_process');
const path = require('path');
const packages = [
{ name: 'React Vite', path: 'packages/react-vite', port: 3000 },
{ name: 'Vue3 Vite', path: 'packages/vue3-vite', port: 4000 },
{ name: 'React Next.js', path: 'packages/react-next', port: 3000 }
];
console.log('🧪 开始测试所有模板...\n');
packages.forEach((pkg, index) => {
console.log(`[${index + 1}/${packages.length}] 测试 ${pkg.name} (${pkg.path})...`);
try {
// 由于已经使用workspace管理只需要测试构建
console.log(' 🔨 测试构建...');
execSync(`cd ${pkg.path} && pnpm build`, { stdio: 'inherit' });
console.log(`${pkg.name} 测试通过\n`);
} catch (error) {
console.error(`${pkg.name} 测试失败:`, error.message);
process.exit(1);
}
});
console.log('🎉 所有模板测试完成!');