create-flexireact 1.3.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,558 @@
1
+ /**
2
+ * Default Template - Full-featured FlexiReact v2 setup
3
+ *
4
+ * Structure:
5
+ * - app/ : Layout, components, styles, providers
6
+ * - routes/ : FlexiReact v2 file-based routing
7
+ * - lib/ : Utilities
8
+ * - public/ : Static assets
9
+ */
10
+ export function defaultTemplate(projectName) {
11
+ return {
12
+ // ========================================================================
13
+ // Config Files
14
+ // ========================================================================
15
+ 'package.json': JSON.stringify({
16
+ name: projectName,
17
+ version: '1.0.0',
18
+ private: true,
19
+ type: 'module',
20
+ scripts: {
21
+ dev: 'npm run css && flexireact dev',
22
+ build: 'npm run css && flexireact build',
23
+ start: 'flexireact start',
24
+ css: 'npx @tailwindcss/cli -i ./app/styles/globals.css -o ./public/styles.css --minify',
25
+ },
26
+ dependencies: {
27
+ react: '^18.2.0',
28
+ 'react-dom': '^18.2.0',
29
+ '@flexireact/core': '^2.0.0',
30
+ clsx: '^2.1.0',
31
+ 'tailwind-merge': '^2.2.0',
32
+ },
33
+ devDependencies: {
34
+ '@types/react': '^18.2.0',
35
+ '@types/react-dom': '^18.2.0',
36
+ typescript: '^5.3.0',
37
+ tailwindcss: '^4.0.0',
38
+ '@tailwindcss/cli': '^4.0.0',
39
+ '@tailwindcss/postcss': '^4.0.0',
40
+ },
41
+ }, null, 2),
42
+ 'tsconfig.json': JSON.stringify({
43
+ compilerOptions: {
44
+ target: 'ES2022',
45
+ lib: ['DOM', 'DOM.Iterable', 'ES2022'],
46
+ module: 'ESNext',
47
+ moduleResolution: 'bundler',
48
+ jsx: 'react-jsx',
49
+ strict: true,
50
+ skipLibCheck: true,
51
+ esModuleInterop: true,
52
+ resolveJsonModule: true,
53
+ isolatedModules: true,
54
+ noEmit: true,
55
+ baseUrl: '.',
56
+ paths: {
57
+ '@/*': ['./*'],
58
+ '@/components/*': ['./app/components/*'],
59
+ '@/lib/*': ['./lib/*'],
60
+ },
61
+ },
62
+ include: ['**/*.ts', '**/*.tsx'],
63
+ exclude: ['node_modules', '.flexi', 'public'],
64
+ }, null, 2),
65
+ 'postcss.config.js': `export default {
66
+ plugins: {
67
+ "@tailwindcss/postcss": {},
68
+ },
69
+ };
70
+ `,
71
+ 'flexireact.config.ts': `import type { FlexiConfig } from '@flexireact/core';
72
+
73
+ const config: FlexiConfig = {
74
+ styles: [
75
+ '/styles.css',
76
+ 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap'
77
+ ],
78
+ favicon: '/favicon.svg',
79
+ server: {
80
+ port: 3000,
81
+ },
82
+ islands: { enabled: true },
83
+ };
84
+
85
+ export default config;
86
+ `,
87
+ // ========================================================================
88
+ // App Directory - Layout, Components, Styles
89
+ // ========================================================================
90
+ 'app/layout.tsx': `import React from 'react';
91
+ import { Navbar } from './components/layout/Navbar';
92
+ import { Footer } from './components/layout/Footer';
93
+
94
+ interface RootLayoutProps {
95
+ children: React.ReactNode;
96
+ }
97
+
98
+ export default function RootLayout({ children }: RootLayoutProps) {
99
+ return (
100
+ <html lang="en" className="dark">
101
+ <head>
102
+ <meta charSet="UTF-8" />
103
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
104
+ <link rel="stylesheet" href="/styles.css" />
105
+ <link rel="icon" href="/favicon.svg" />
106
+ </head>
107
+ <body className="bg-background text-foreground min-h-screen antialiased">
108
+ <div className="flex flex-col min-h-screen">
109
+ <Navbar />
110
+ <main className="flex-1">{children}</main>
111
+ <Footer />
112
+ </div>
113
+ </body>
114
+ </html>
115
+ );
116
+ }
117
+ `,
118
+ // Components - UI
119
+ 'app/components/ui/Button.tsx': `import React from 'react';
120
+ import { cn } from '@/lib/utils';
121
+
122
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
123
+ variant?: 'primary' | 'secondary' | 'ghost' | 'outline';
124
+ size?: 'sm' | 'md' | 'lg';
125
+ }
126
+
127
+ export function Button({
128
+ className,
129
+ variant = 'primary',
130
+ size = 'md',
131
+ children,
132
+ ...props
133
+ }: ButtonProps) {
134
+ return (
135
+ <button
136
+ className={cn(
137
+ 'inline-flex items-center justify-center font-medium rounded-lg transition-all',
138
+ 'focus:outline-none focus:ring-2 focus:ring-primary/50',
139
+ 'disabled:opacity-50 disabled:cursor-not-allowed',
140
+ {
141
+ 'bg-primary text-black hover:bg-primary/90': variant === 'primary',
142
+ 'bg-secondary text-white hover:bg-secondary/80': variant === 'secondary',
143
+ 'hover:bg-white/5': variant === 'ghost',
144
+ 'border border-border hover:bg-white/5 hover:border-primary': variant === 'outline',
145
+ 'px-3 py-1.5 text-sm': size === 'sm',
146
+ 'px-4 py-2 text-sm': size === 'md',
147
+ 'px-6 py-3 text-base': size === 'lg',
148
+ },
149
+ className
150
+ )}
151
+ {...props}
152
+ >
153
+ {children}
154
+ </button>
155
+ );
156
+ }
157
+ `,
158
+ 'app/components/ui/Card.tsx': `import React from 'react';
159
+ import { cn } from '@/lib/utils';
160
+
161
+ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
162
+ variant?: 'default' | 'glass';
163
+ }
164
+
165
+ export function Card({ className, variant = 'default', children, ...props }: CardProps) {
166
+ return (
167
+ <div
168
+ className={cn(
169
+ 'rounded-xl border border-border p-6 transition-all',
170
+ {
171
+ 'bg-card': variant === 'default',
172
+ 'bg-white/5 backdrop-blur-xl': variant === 'glass',
173
+ },
174
+ 'hover:border-primary/50',
175
+ className
176
+ )}
177
+ {...props}
178
+ >
179
+ {children}
180
+ </div>
181
+ );
182
+ }
183
+
184
+ export function CardHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
185
+ return <div className={cn('mb-4', className)} {...props} />;
186
+ }
187
+
188
+ export function CardTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) {
189
+ return <h3 className={cn('text-lg font-semibold', className)} {...props} />;
190
+ }
191
+
192
+ export function CardContent({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
193
+ return <div className={cn('text-muted', className)} {...props} />;
194
+ }
195
+ `,
196
+ 'app/components/ui/index.ts': `export { Button } from './Button';
197
+ export { Card, CardHeader, CardTitle, CardContent } from './Card';
198
+ `,
199
+ // Components - Layout
200
+ 'app/components/layout/Navbar.tsx': `import React from 'react';
201
+
202
+ export function Navbar() {
203
+ return (
204
+ <header className="sticky top-0 z-50 border-b border-border bg-background/80 backdrop-blur-xl">
205
+ <nav className="container mx-auto px-4 h-16 flex items-center justify-between max-w-6xl">
206
+ <a href="/" className="flex items-center gap-2">
207
+ <div className="w-8 h-8 bg-primary rounded-lg flex items-center justify-center">
208
+ <span className="text-black font-bold text-sm">F</span>
209
+ </div>
210
+ <span className="font-semibold text-lg">FlexiReact</span>
211
+ </a>
212
+
213
+ <div className="flex items-center gap-6">
214
+ <a href="/" className="text-sm text-muted hover:text-foreground transition-colors">Home</a>
215
+ <a href="/about" className="text-sm text-muted hover:text-foreground transition-colors">About</a>
216
+ <a href="/blog" className="text-sm text-muted hover:text-foreground transition-colors">Blog</a>
217
+ <a
218
+ href="https://github.com/nicksdev/flexireact"
219
+ target="_blank"
220
+ className="text-sm text-muted hover:text-foreground transition-colors"
221
+ >
222
+ GitHub
223
+ </a>
224
+ </div>
225
+ </nav>
226
+ </header>
227
+ );
228
+ }
229
+ `,
230
+ 'app/components/layout/Footer.tsx': `import React from 'react';
231
+
232
+ export function Footer() {
233
+ return (
234
+ <footer className="border-t border-border py-8 mt-auto">
235
+ <div className="container mx-auto px-4 text-center text-sm text-muted max-w-6xl">
236
+ <p>Built with FlexiReact v2 • {new Date().getFullYear()}</p>
237
+ </div>
238
+ </footer>
239
+ );
240
+ }
241
+ `,
242
+ 'app/components/layout/index.ts': `export { Navbar } from './Navbar';
243
+ export { Footer } from './Footer';
244
+ `,
245
+ 'app/components/index.ts': `export * from './ui';
246
+ export * from './layout';
247
+ `,
248
+ // Providers
249
+ 'app/providers/ThemeProvider.tsx': `'use client';
250
+
251
+ import React, { createContext, useContext, useState, useEffect } from 'react';
252
+
253
+ type Theme = 'light' | 'dark' | 'system';
254
+
255
+ interface ThemeContextType {
256
+ theme: Theme;
257
+ setTheme: (theme: Theme) => void;
258
+ }
259
+
260
+ const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
261
+
262
+ export function ThemeProvider({ children }: { children: React.ReactNode }) {
263
+ const [theme, setTheme] = useState<Theme>('dark');
264
+
265
+ useEffect(() => {
266
+ const root = document.documentElement;
267
+ root.classList.remove('light', 'dark');
268
+
269
+ if (theme === 'system') {
270
+ const systemTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
271
+ root.classList.add(systemTheme);
272
+ } else {
273
+ root.classList.add(theme);
274
+ }
275
+ }, [theme]);
276
+
277
+ return (
278
+ <ThemeContext.Provider value={{ theme, setTheme }}>
279
+ {children}
280
+ </ThemeContext.Provider>
281
+ );
282
+ }
283
+
284
+ export function useTheme() {
285
+ const context = useContext(ThemeContext);
286
+ if (!context) throw new Error('useTheme must be used within ThemeProvider');
287
+ return context;
288
+ }
289
+ `,
290
+ // Styles
291
+ 'app/styles/globals.css': `@import "tailwindcss";
292
+
293
+ /* FlexiReact v2 Theme */
294
+ @theme {
295
+ /* Colors */
296
+ --color-background: #0a0a0a;
297
+ --color-foreground: #fafafa;
298
+ --color-primary: #00FF9C;
299
+ --color-secondary: #1a1a1a;
300
+ --color-muted: #71717a;
301
+ --color-border: #27272a;
302
+ --color-card: #18181b;
303
+
304
+ /* Typography */
305
+ --font-sans: "Inter", system-ui, -apple-system, sans-serif;
306
+
307
+ /* Radius */
308
+ --radius-sm: 0.25rem;
309
+ --radius-md: 0.5rem;
310
+ --radius-lg: 0.75rem;
311
+ }
312
+
313
+ body {
314
+ font-family: var(--font-sans);
315
+ background-color: var(--color-background);
316
+ color: var(--color-foreground);
317
+ -webkit-font-smoothing: antialiased;
318
+ }
319
+ `,
320
+ // ========================================================================
321
+ // Routes Directory - FlexiReact v2 Routing
322
+ // ========================================================================
323
+ 'routes/(public)/home.tsx': `import React from 'react';
324
+ import { Button } from '@/app/components/ui';
325
+
326
+ export const metadata = {
327
+ title: 'FlexiReact v2 - The Modern React Framework',
328
+ description: 'Build fast, modern web apps with FlexiReact v2',
329
+ };
330
+
331
+ export default function HomePage() {
332
+ return (
333
+ <div className="min-h-[calc(100vh-8rem)] flex flex-col items-center justify-center px-4">
334
+ <div className="text-center max-w-3xl">
335
+ {/* Logo */}
336
+ <div className="w-20 h-20 bg-primary rounded-2xl flex items-center justify-center mx-auto mb-8 shadow-[0_0_30px_rgba(0,255,156,0.3)]">
337
+ <span className="text-black font-bold text-3xl">F</span>
338
+ </div>
339
+
340
+ {/* Heading */}
341
+ <h1 className="text-5xl md:text-6xl font-bold mb-6">
342
+ Welcome to{' '}
343
+ <span className="text-primary">FlexiReact v2</span>
344
+ </h1>
345
+
346
+ {/* Description */}
347
+ <p className="text-xl text-muted mb-8 max-w-2xl mx-auto">
348
+ The modern React framework with SSR, Islands, App Router, and more.
349
+ Build blazing fast web applications with ease.
350
+ </p>
351
+
352
+ {/* CTA Buttons */}
353
+ <div className="flex gap-4 justify-center flex-wrap">
354
+ <Button size="lg">Get Started →</Button>
355
+ <Button variant="outline" size="lg">Documentation</Button>
356
+ </div>
357
+
358
+ {/* Features */}
359
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-4 mt-16">
360
+ {[
361
+ { icon: '⚡', label: 'SSR/SSG' },
362
+ { icon: '🏝️', label: 'Islands' },
363
+ { icon: '📦', label: 'File Routing' },
364
+ { icon: '🎨', label: 'Tailwind v4' },
365
+ ].map((feature) => (
366
+ <div key={feature.label} className="p-4 rounded-xl bg-white/5 border border-border">
367
+ <div className="text-2xl mb-2">{feature.icon}</div>
368
+ <div className="text-sm font-medium">{feature.label}</div>
369
+ </div>
370
+ ))}
371
+ </div>
372
+ </div>
373
+ </div>
374
+ );
375
+ }
376
+ `,
377
+ 'routes/(public)/about.tsx': `import React from 'react';
378
+ import { Card, CardHeader, CardTitle, CardContent } from '@/app/components/ui';
379
+
380
+ export const metadata = {
381
+ title: 'About - FlexiReact',
382
+ };
383
+
384
+ export default function AboutPage() {
385
+ return (
386
+ <div className="container mx-auto px-4 py-16 max-w-3xl">
387
+ <h1 className="text-4xl font-bold mb-8">About FlexiReact</h1>
388
+
389
+ <Card className="mb-6">
390
+ <CardHeader>
391
+ <CardTitle>What is FlexiReact?</CardTitle>
392
+ </CardHeader>
393
+ <CardContent>
394
+ <p>
395
+ FlexiReact is a modern React framework designed for building fast,
396
+ scalable web applications. It combines the best features of popular
397
+ frameworks with a flexible, intuitive API.
398
+ </p>
399
+ </CardContent>
400
+ </Card>
401
+
402
+ <Card>
403
+ <CardHeader>
404
+ <CardTitle>Features</CardTitle>
405
+ </CardHeader>
406
+ <CardContent>
407
+ <ul className="space-y-2">
408
+ <li>✓ Server-Side Rendering (SSR)</li>
409
+ <li>✓ Static Site Generation (SSG)</li>
410
+ <li>✓ Islands Architecture</li>
411
+ <li>✓ File-based Routing</li>
412
+ <li>✓ TypeScript Support</li>
413
+ <li>✓ Tailwind CSS v4</li>
414
+ </ul>
415
+ </CardContent>
416
+ </Card>
417
+ </div>
418
+ );
419
+ }
420
+ `,
421
+ 'routes/blog/index.tsx': `import React from 'react';
422
+ import { Card, CardHeader, CardTitle, CardContent } from '@/app/components/ui';
423
+
424
+ export const metadata = {
425
+ title: 'Blog - FlexiReact',
426
+ };
427
+
428
+ const posts = [
429
+ { slug: 'getting-started', title: 'Getting Started', excerpt: 'Learn how to build your first app...' },
430
+ { slug: 'routing', title: 'File-based Routing', excerpt: 'Deep dive into the router...' },
431
+ { slug: 'islands', title: 'Islands Architecture', excerpt: 'Partial hydration for performance...' },
432
+ ];
433
+
434
+ export default function BlogPage() {
435
+ return (
436
+ <div className="container mx-auto px-4 py-16 max-w-6xl">
437
+ <h1 className="text-4xl font-bold mb-8">Blog</h1>
438
+
439
+ <div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
440
+ {posts.map((post) => (
441
+ <a key={post.slug} href={\`/blog/\${post.slug}\`}>
442
+ <Card className="h-full">
443
+ <CardHeader>
444
+ <CardTitle>{post.title}</CardTitle>
445
+ </CardHeader>
446
+ <CardContent>
447
+ <p>{post.excerpt}</p>
448
+ </CardContent>
449
+ </Card>
450
+ </a>
451
+ ))}
452
+ </div>
453
+ </div>
454
+ );
455
+ }
456
+ `,
457
+ 'routes/blog/[slug].tsx': `import React from 'react';
458
+ import { Button } from '@/app/components/ui';
459
+
460
+ interface BlogPostProps {
461
+ params: { slug: string };
462
+ }
463
+
464
+ export default function BlogPost({ params }: BlogPostProps) {
465
+ return (
466
+ <div className="container mx-auto px-4 py-16 max-w-3xl">
467
+ <a href="/blog">
468
+ <Button variant="ghost" size="sm" className="mb-8">← Back to Blog</Button>
469
+ </a>
470
+
471
+ <h1 className="text-4xl font-bold mb-4">Blog Post: {params.slug}</h1>
472
+
473
+ <p className="text-muted mb-8">
474
+ This is a dynamic route. The slug parameter is: <code className="text-primary">{params.slug}</code>
475
+ </p>
476
+
477
+ <div className="prose prose-invert">
478
+ <p>
479
+ This page demonstrates dynamic routing in FlexiReact v2.
480
+ The [slug].tsx file creates a dynamic route that matches any path under /blog/.
481
+ </p>
482
+ </div>
483
+ </div>
484
+ );
485
+ }
486
+ `,
487
+ // API routes
488
+ 'routes/api/hello.ts': `export async function GET() {
489
+ return Response.json({
490
+ message: 'Hello from FlexiReact API!',
491
+ timestamp: new Date().toISOString(),
492
+ });
493
+ }
494
+
495
+ export async function POST(request: Request) {
496
+ const body = await request.json();
497
+ return Response.json({
498
+ received: body,
499
+ message: 'POST request received',
500
+ });
501
+ }
502
+ `,
503
+ // ========================================================================
504
+ // Lib Directory
505
+ // ========================================================================
506
+ 'lib/utils.ts': `import { clsx, type ClassValue } from 'clsx';
507
+ import { twMerge } from 'tailwind-merge';
508
+
509
+ export function cn(...inputs: ClassValue[]) {
510
+ return twMerge(clsx(inputs));
511
+ }
512
+ `,
513
+ // ========================================================================
514
+ // Public Directory
515
+ // ========================================================================
516
+ 'public/favicon.svg': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
517
+ <defs>
518
+ <linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%">
519
+ <stop offset="0%" style="stop-color:#00FF9C"/>
520
+ <stop offset="100%" style="stop-color:#00D68F"/>
521
+ </linearGradient>
522
+ </defs>
523
+ <rect width="100" height="100" rx="20" fill="#0a0a0a"/>
524
+ <text x="50" y="68" font-family="system-ui" font-size="50" font-weight="900" fill="url(#grad)" text-anchor="middle">F</text>
525
+ </svg>`,
526
+ 'public/.gitkeep': '',
527
+ // ========================================================================
528
+ // Git
529
+ // ========================================================================
530
+ '.gitignore': `# Dependencies
531
+ node_modules/
532
+ .pnpm-store/
533
+
534
+ # Build
535
+ .flexi/
536
+ dist/
537
+ public/styles.css
538
+
539
+ # IDE
540
+ .vscode/
541
+ .idea/
542
+
543
+ # OS
544
+ .DS_Store
545
+ Thumbs.db
546
+
547
+ # Env
548
+ .env
549
+ .env.local
550
+ .env.*.local
551
+
552
+ # Logs
553
+ *.log
554
+ npm-debug.log*
555
+ `,
556
+ };
557
+ }
558
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../src/templates/default.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,UAAU,eAAe,CAAC,WAAmB;IACjD,OAAO;QACL,2EAA2E;QAC3E,eAAe;QACf,2EAA2E;QAE3E,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC;YAC7B,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,GAAG,EAAE,+BAA+B;gBACpC,KAAK,EAAE,iCAAiC;gBACxC,KAAK,EAAE,kBAAkB;gBACzB,GAAG,EAAE,kFAAkF;aACxF;YACD,YAAY,EA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ACE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Template definitions for create-flexireact
3
+ */
4
+ export interface Template {
5
+ name: string;
6
+ description: string;
7
+ icon: string;
8
+ }
9
+ export declare const TEMPLATES: Record<string, Template>;
10
+ export type TemplateFiles = Record<string, string>;
11
+ export declare function getTemplateFiles(templateKey: string, projectName: string): TemplateFiles;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAgB9C,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,aAAa,CASxF"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Template definitions for create-flexireact
3
+ */
4
+ import { defaultTemplate } from './default.js';
5
+ import { minimalTemplate } from './minimal.js';
6
+ import { appRouterTemplate } from './app-router.js';
7
+ export const TEMPLATES = {
8
+ default: {
9
+ name: 'Default',
10
+ description: 'Full-featured template with routes/, components, and Tailwind v4',
11
+ icon: '⚡',
12
+ },
13
+ minimal: {
14
+ name: 'Minimal',
15
+ description: 'Bare minimum FlexiReact setup',
16
+ icon: '📦',
17
+ },
18
+ 'app-router': {
19
+ name: 'App Router',
20
+ description: 'Next.js style app/ directory routing',
21
+ icon: '🚀',
22
+ },
23
+ };
24
+ export function getTemplateFiles(templateKey, projectName) {
25
+ switch (templateKey) {
26
+ case 'minimal':
27
+ return minimalTemplate(projectName);
28
+ case 'app-router':
29
+ return appRouterTemplate(projectName);
30
+ default:
31
+ return defaultTemplate(projectName);
32
+ }
33
+ }
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAQpD,MAAM,CAAC,MAAM,SAAS,GAA6B;IACjD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,kEAAkE;QAC/E,IAAI,EAAE,GAAG;KACV;IACD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,+BAA+B;QAC5C,IAAI,EAAE,IAAI;KACX;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,sCAAsC;QACnD,IAAI,EAAE,IAAI;KACX;CACF,CAAC;AAIF,MAAM,UAAU,gBAAgB,CAAC,WAAmB,EAAE,WAAmB;IACvE,QAAQ,WAAW,EAAE,CAAC;QACpB,KAAK,SAAS;YACZ,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC;QACtC,KAAK,YAAY;YACf,OAAO,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACxC;YACE,OAAO,eAAe,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC;AACH,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Minimal Template - Bare minimum FlexiReact setup
3
+ */
4
+ import type { TemplateFiles } from './index.js';
5
+ export declare function minimalTemplate(projectName: string): TemplateFiles;
6
+ //# sourceMappingURL=minimal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minimal.d.ts","sourceRoot":"","sources":["../../src/templates/minimal.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAuElE"}