mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 22:57:31 +00:00
rm turbo on standalone
This commit is contained in:
@@ -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');
|
||||||
|
@@ -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/**"]
|
||||||
|
Reference in New Issue
Block a user