Add Mode2Svelte - advanced SvelteKit implementation
- Created Mode2Svelte as a copy of Mode1Svelte - Updated branding (title, description) to distinguish from Mode1Svelte - Added Mode2Svelte support to orchestrator - Configured orchestrator to spawn Mode2Svelte with Node.js adapter - Set Mode2Svelte as active mode in activeMode.txt - Built production bundle for Mode2Svelte - Both Mode1Svelte and Mode2Svelte now managed by orchestrator on port 3005 - Orchestrator controls which mode runs via activeMode.txt configuration
This commit is contained in:
@@ -1 +1 @@
|
||||
Mode1Svelte
|
||||
Mode2Svelte
|
||||
@@ -12,6 +12,7 @@ const ORCHESTRATOR_PORT = 3006; // Orchestrator API runs here
|
||||
const MODE_FOLDERS: Record<string, string> = {
|
||||
'Mode1': 'Mode1',
|
||||
'Mode1Svelte': 'Mode1Svelte',
|
||||
'Mode2Svelte': 'Mode2Svelte',
|
||||
'Mode6Test': 'Mode6Test',
|
||||
};
|
||||
|
||||
@@ -82,11 +83,11 @@ async function startMode(mode: string): Promise<boolean> {
|
||||
|
||||
console.log(`[ModeSwitch] Starting ${mode} (${folderName}/) on port ${SHARED_PORT}...`);
|
||||
|
||||
// Mode1Svelte uses Node.js adapter with build/index.js
|
||||
if (mode === 'Mode1Svelte') {
|
||||
// Mode1Svelte and Mode2Svelte use Node.js adapter with build/index.js
|
||||
if (mode === 'Mode1Svelte' || mode === 'Mode2Svelte') {
|
||||
const buildPath = `${modePath}/build`;
|
||||
if (!fs.existsSync(buildPath)) {
|
||||
console.error(`Build directory not found for Mode1Svelte. Run: cd ${modePath} && npm run build`);
|
||||
console.error(`Build directory not found for ${mode}. Run: cd ${modePath} && npm run build`);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user