rm turbo on standalone

This commit is contained in:
Max Peintner
2025-07-10 17:28:14 +02:00
parent a9e696437e
commit 6768d7bf6d
2 changed files with 24 additions and 4 deletions

View File

@@ -8,8 +8,9 @@
import fs from 'fs/promises'; import fs from 'fs/promises';
import { execSync } from 'child_process'; import { execSync } from 'child_process';
const CONFIG_FILES = [ const FILES_TO_REMOVE = [
// TypeScript config is now unified - no separate standalone version needed // Turbo is not needed for standalone builds since there are no workspace dependencies
{ file: 'turbo.json', backup: 'turbo.monorepo.backup.json' }
]; ];
async function prepareStandalone() { async function prepareStandalone() {
@@ -35,7 +36,25 @@ async function prepareStandalone() {
throw new Error('package.standalone.json not found!'); throw new Error('package.standalone.json not found!');
} }
// Step 2: Install dependencies if requested // Step 2: Remove unnecessary files for standalone
console.log('🗑️ Removing monorepo-specific files...');
for (const item of FILES_TO_REMOVE) {
const fileExists = await fs.access(item.file).then(() => true).catch(() => false);
if (fileExists) {
// Backup current file
await fs.copyFile(item.file, item.backup);
console.log(` 💾 Backed up ${item.file}${item.backup}`);
// Remove the file
await fs.unlink(item.file);
console.log(` 🗑️ Removed ${item.file} (not needed in standalone)`);
} else {
console.log(` ${item.file} not found, skipping`);
}
}
// Step 3: Install dependencies if requested
if (shouldInstall) { if (shouldInstall) {
console.log('\n📥 Installing dependencies...'); console.log('\n📥 Installing dependencies...');
try { try {
@@ -47,6 +66,7 @@ async function prepareStandalone() {
} }
console.log('\n🎉 Standalone preparation complete!'); console.log('\n🎉 Standalone preparation complete!');
console.log(' ✨ Turbo removed - using standard npm scripts');
console.log('\n📋 Next steps:'); console.log('\n📋 Next steps:');
if (!shouldInstall) { if (!shouldInstall) {
console.log(' 1. Run: pnpm install'); console.log(' 1. Run: pnpm install');

View File

@@ -3,7 +3,7 @@
"tasks": { "tasks": {
"build": { "build": {
"outputs": ["dist/**", ".next/**", "!.next/cache/**"], "outputs": ["dist/**", ".next/**", "!.next/cache/**"],
"dependsOn": ["^build"] "dependsOn": ["@zitadel/client#build", "@zitadel/proto#generate"]
}, },
"build:login:standalone": { "build:login:standalone": {
"outputs": ["dist/**", ".next/**", "!.next/cache/**"] "outputs": ["dist/**", ".next/**", "!.next/cache/**"]