create-frootkit 0.0.0-stage → 1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 OrbitNorth LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,41 @@
1
- # Temporary Holding Version
1
+ # create-frootkit
2
+
3
+ > Official dedicated scaffolder CLI for [FrootKit](https://github.com/orbitnorth/frootkit) — The Zero-Overhead Next.js Alternative.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/create-frootkit.svg)](https://www.npmjs.com/package/create-frootkit)
6
+ [![license](https://img.shields.io/npm/l/create-frootkit.svg)](https://github.com/orbitnorth/create-frootkit/blob/main/LICENSE)
7
+
8
+ ---
9
+
10
+ ## ⚡ Usage
11
+
12
+ Scaffold a production-ready FrootKit application in seconds:
13
+
14
+ ```bash
15
+ # Using npm
16
+ npm create frootkit@latest my-app
17
+
18
+ # Using pnpm
19
+ pnpm create frootkit my-app
20
+
21
+ # Using bun
22
+ bun create frootkit my-app
23
+ ```
24
+
25
+ ### Options
26
+
27
+ | Flag | Description | Default |
28
+ | :--- | :--- | :--- |
29
+ | `<directory>` | Target project directory | `.` |
30
+ | `--name <name>` | Project package name | Directory name |
31
+ | `--pm <manager>` | Package manager (`npm`, `pnpm`, `bun`, `yarn`) | Auto-detected |
32
+ | `--git` / `--no-git` | Initialize git repository | `--git` |
33
+ | `--install` / `--no-install` | Auto-install dependencies | Prompt |
34
+ | `-y`, `--yes` | Skip prompts and use defaults | `false` |
35
+
36
+ ---
37
+
38
+ ## 📄 License
39
+
40
+ MIT © [OrbitNorth LLC](https://github.com/orbitnorth)
2
41
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * create-frootkit CLI
4
+ * The official project scaffolder for FrootKit (Next.js Alternative).
5
+ */
6
+ export * from './template.js';
7
+ export * from './scaffold.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAOH,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,102 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * create-frootkit CLI
4
+ * The official project scaffolder for FrootKit (Next.js Alternative).
5
+ */
6
+ import * as readline from 'node:readline/promises';
7
+ import { stdin as input, stdout as output } from 'node:process';
8
+ import * as path from 'node:path';
9
+ import { scaffoldProject } from './scaffold.js';
10
+ export * from './template.js';
11
+ export * from './scaffold.js';
12
+ async function main() {
13
+ const args = process.argv.slice(2);
14
+ if (args.includes('-h') || args.includes('--help')) {
15
+ console.log(`
16
+ ▲ create-frootkit — The Next.js Alternative Project Scaffolder
17
+
18
+ Usage:
19
+ npm create frootkit [project-directory] [options]
20
+ npx create-frootkit [project-directory] [options]
21
+
22
+ Options:
23
+ -y, --yes Accept all defaults non-interactively
24
+ --pm <manager> Package manager: pnpm | npm | yarn | bun
25
+ --git / --no-git Initialize git repository
26
+ --install Install dependencies automatically
27
+ -h, --help Show help message
28
+ `);
29
+ process.exit(0);
30
+ }
31
+ let projectDir = args.find((a) => !a.startsWith('-')) || '';
32
+ const isNonInteractive = args.includes('-y') || args.includes('--yes');
33
+ if (!projectDir && isNonInteractive) {
34
+ projectDir = 'my-frootkit-app';
35
+ }
36
+ let pkgManager = 'npm';
37
+ const pmArg = args.indexOf('--pm');
38
+ if (pmArg !== -1 && args[pmArg + 1]) {
39
+ pkgManager = args[pmArg + 1];
40
+ }
41
+ else if (process.env.npm_config_user_agent?.includes('pnpm')) {
42
+ pkgManager = 'pnpm';
43
+ }
44
+ else if (process.env.npm_config_user_agent?.includes('bun')) {
45
+ pkgManager = 'bun';
46
+ }
47
+ let gitInit = args.includes('--git');
48
+ let installDeps = args.includes('--install');
49
+ if (!isNonInteractive) {
50
+ const rl = readline.createInterface({ input, output });
51
+ console.log(`
52
+ ▲ FrootKit — Next.js Alternative Scaffolder
53
+ ──────────────────────────────────────────
54
+ `);
55
+ if (!projectDir) {
56
+ projectDir = (await rl.question(' Project directory: (my-frootkit-app) ')).trim() || 'my-frootkit-app';
57
+ }
58
+ const gitAnswer = (await rl.question(' Initialize git repository? (Y/n) ')).trim().toLowerCase();
59
+ gitInit = gitAnswer === '' || gitAnswer === 'y' || gitAnswer === 'yes';
60
+ const installAnswer = (await rl.question(` Install dependencies with ${pkgManager}? (y/N) `)).trim().toLowerCase();
61
+ installDeps = installAnswer === 'y' || installAnswer === 'yes';
62
+ rl.close();
63
+ }
64
+ const targetDir = path.resolve(process.cwd(), projectDir);
65
+ const projectName = path.basename(targetDir);
66
+ console.log(`\n Creating FrootKit application in ${targetDir}...`);
67
+ const result = await scaffoldProject({
68
+ targetDir,
69
+ projectName,
70
+ pkgManager,
71
+ gitInit,
72
+ installDeps,
73
+ });
74
+ console.log(`
75
+ ✓ Created ${result.fileCount} files
76
+ ${gitInit ? '✓ Initialized git repository\n' : ''}
77
+ Success! Next steps:
78
+ $ cd ${projectDir}
79
+ $ ${pkgManager} install
80
+ $ ${pkgManager} run dev
81
+
82
+ Server starts on http://localhost:3000
83
+ `);
84
+ }
85
+ import { fileURLToPath } from 'node:url';
86
+ // Only execute when invoked directly as CLI
87
+ const thisFile = fileURLToPath(import.meta.url);
88
+ const invokedFile = process.argv[1] ? path.resolve(process.argv[1]) : '';
89
+ const isDirectCli = invokedFile === thisFile ||
90
+ invokedFile.endsWith('create-frootkit') ||
91
+ invokedFile.endsWith('create-frootkit\\dist\\index.js') ||
92
+ invokedFile.endsWith('create-frootkit/dist/index.js') ||
93
+ invokedFile.endsWith('create-froot-fullstack') ||
94
+ invokedFile.endsWith('create-froot-fullstack\\dist\\index.js') ||
95
+ invokedFile.endsWith('create-froot-fullstack/dist/index.js');
96
+ if (isDirectCli && !process.env['NODE_TEST_CONTEXT']) {
97
+ main().catch((err) => {
98
+ console.error('Fatal CLI error:', err);
99
+ process.exit(1);
100
+ });
101
+ }
102
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAE9B,KAAK,UAAU,IAAI;IACjB,MAAM,IAAI,GAAG,OAAO,CAAC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eps?: boolean;
7
+ }
8
+ export declare function scaffoldProject(options: ScaffoldOptions): Promise<{
9
+ fileCount: number;
10
+ }>;
11
+ //# sourceMappingURL=scaffold.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../src/scaffold.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAqC9F"}
@@ -0,0 +1,35 @@
1
+ import * as fs from 'node:fs/promises';
2
+ import * as path from 'node:path';
3
+ import { exec } from 'node:child_process';
4
+ import { promisify } from 'node:util';
5
+ import { generateFrootKitTemplate } from './template.js';
6
+ const execAsync = promisify(exec);
7
+ export async function scaffoldProject(options) {
8
+ const { targetDir, projectName, pkgManager = 'npm', gitInit = false, installDeps = false, } = options;
9
+ await fs.mkdir(targetDir, { recursive: true });
10
+ const files = generateFrootKitTemplate(projectName);
11
+ const filePaths = Object.keys(files);
12
+ for (const relPath of filePaths) {
13
+ const fullPath = path.join(targetDir, relPath);
14
+ await fs.mkdir(path.dirname(fullPath), { recursive: true });
15
+ await fs.writeFile(fullPath, files[relPath], 'utf8');
16
+ }
17
+ if (gitInit) {
18
+ try {
19
+ await execAsync('git init', { cwd: targetDir });
20
+ }
21
+ catch {
22
+ // ignore git init errors
23
+ }
24
+ }
25
+ if (installDeps) {
26
+ try {
27
+ await execAsync(`${pkgManager} install`, { cwd: targetDir });
28
+ }
29
+ catch {
30
+ // ignore install errors
31
+ }
32
+ }
33
+ return { fileCount: fil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AAM,SAAS,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,yBAAyB;QAC3B,CAAC;IACH,CAAC;IAED,IAAI,WAAW,EAAE,CAAC;QAChB,IAAI,CAAC;YACH,MAAM,SAAS,CAAC,GAAG,UAAU,UAAU,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;QAC/D,CAAC;QAAC,MAAM,CAAC;YACP,wBAAwB;QAC1B,CAAC;IACH,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC;AACzC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Template Definition for FrootKit (Next.js Alternative).
3
+ * Generates an ultra-fast, zero-wrapper Preact SSR application with Tailwind CSS v4.
4
+ */
5
+ export interface TemplateFileMap {
6
+ [filePath: string]: string;
7
+ }
8
+ export declare function generateFrootKitTemplate(projectName: string): TemplateFileMap;
9
+ export declare const generateFullstackTemplate: typeof generateFrootKitTemplate;
10
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,eAAe;IAC9B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,CA6S7E;AAED,eAAO,MAAM,yBAAyB,iCAA2B,CAAC"}
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Template Definition for FrootKit (Next.js Alternative).
3
+ * Generates an ultra-fast, zero-wrapper Preact SSR application with Tailwind CSS v4.
4
+ */
5
+ export function generateFrootKitTemplate(projectName) {
6
+ return {
7
+ 'package.json': JSON.stringify({
8
+ name: projectName,
9
+ version: '1.0.0',
10
+ type: 'module',
11
+ scripts: {
12
+ dev: 'frootkit dev',
13
+ build: 'frootkit build',
14
+ start: 'frootkit start',
15
+ },
16
+ dependencies: {
17
+ 'frootkit': '^1.2.2',
18
+ frootjs: '^1.0.6',
19
+ preact: '^11.1.0',
20
+ 'preact-render-to-string': '^6.8.2',
21
+ },
22
+ devDependencies: {
23
+ '@tailwindcss/cli': '^4.0.0',
24
+ tailwindcss: '^4.0.0',
25
+ '@types/node': '^22.10.0',
26
+ typescript: '^5.8.0',
27
+ },
28
+ }, null, 2) + '\n',
29
+ 'tsconfig.json': `{
30
+ "compilerOptions": {
31
+ "target": "ES2024",
32
+ "module": "NodeNext",
33
+ "moduleResolution": "NodeNext",
34
+ "jsx": "react-jsx",
35
+ "jsxImportSource": "preact",
36
+ "strict": true,
37
+ "skipLibCheck": true,
38
+ "noEmit": true
39
+ },
40
+ "include": ["src/**/*"]
41
+ }
42
+ `,
43
+ '.gitignore': `# Dependencies
44
+ node_modules/
45
+ .pnpm-store/
46
+
47
+ # Froot Fullstack build output (like .next in Next.js)
48
+ .froot/
49
+ dist/
50
+ .cache/
51
+
52
+ # OS and IDE files
53
+ .DS_Store
54
+ Thumbs.db
55
+ .vscode/
56
+ .idea/
57
+ *.log
58
+ `,
59
+ 'src/styles.css': `@import "tailwindcss";
60
+
61
+ @theme {
62
+ --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
63
+ --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
64
+
65
+ --color-brand-50: #ecfdf5;
66
+ --color-brand-100: #d1fae5;
67
+ --color-brand-200: #a7f3d0;
68
+ --color-brand-300: #6ee7b7;
69
+ --color-brand-400: #34d399;
70
+ --color-brand-500: #10b981;
71
+ --color-brand-600: #059669;
72
+ --color-brand-700: #047857;
73
+ --color-brand-800: #065f46;
74
+ --color-brand-900: #064e3b;
75
+ --color-brand-950: #022c22;
76
+ }
77
+
78
+ :root {
79
+ color-scheme: dark;
80
+ }
81
+
82
+ body {
83
+ margin: 0;
84
+ font-family: var(--font-sans);
85
+ background-color: #030712;
86
+ color: #f8fafc;
87
+ }
88
+ `,
89
+ 'src/app/layout.tsx': `/** @jsxImportSource preact */
90
+ import type { ComponentChildren } from 'preact';
91
+
92
+ export interface RootLayoutProps {
93
+ children: ComponentChildren;
94
+ metadata?: {
95
+ title?: string;
96
+ description?: string;
97
+ };
98
+ }
99
+
100
+ export default function RootLayout({ children, metadata }: RootLayoutProps) {
101
+ const title = metadata?.title || 'Froot Fullstack App — Next.js Alternative';
102
+ const description = metadata?.description || 'Ultra-fast Preact SSR & Tailwind CSS v4 native web application.';
103
+
104
+ return (
105
+ <html lang="en" class="dark scroll-smooth">
106
+ <head>
107
+ <meta charSet="UTF-8" />
108
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
109
+ <title>{title}</title>
110
+ <meta name="description" content={description} />
111
+ <link rel="stylesheet" href="/styles.css" />
112
+ </head>
113
+ <body class="bg-[#030712] text-slate-100 min-h-screen antialiased">
114
+ {children}
115
+ </body>
116
+ </html>
117
+ );
118
+ }
119
+ `,
120
+ 'src/app/page.tsx': `/** @jsxImportSource preact */
121
+ export const metadata = {
122
+ title: 'Home — Froot Fullstack Application',
123
+ description: 'Next.js Alternative with Preact SSR, nested layouts, and native Tailwind v4.',
124
+ };
125
+
126
+ export default function HomePage() {
127
+ return (
128
+ <div class="max-w-4xl mx-auto px-6 py-20 text-center">
129
+ <div class="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-emerald-500/10 border border-emerald-500/25 text-xs font-semibold text-emerald-400 mb-6">
130
+ Next.js Alternative &bull; Preact SSR &bull; Tailwind CSS v4
131
+ </div>
132
+ <h1 class="text-4xl sm:text-6xl font-extrabold text-white tracking-tight mb-4">
133
+ Extreme Performance <span class="text-emerald-400">Fullstack Engine</span>
134
+ </h1>
135
+ <p class="text-slate-300 text-lg max-w-2xl mx-auto mb-8">
136
+ Sub-millisecond Preact SSR, hierarchical nested layouts, and zero-wrapper CLI builds.
137
+ </p>
138
+ <div class="flex items-center justify-center gap-4">
139
+ <a
140
+ href="/docs"
141
+ class="px-5 py-2.5 rounded-lg bg-emerald-500 text-slate-950 font-bold hover:bg-emerald-400 transition-colors"
142
+ >
143
+ Explore Docs &rarr;
144
+ </a>
145
+ </div>
146
+ </div>
147
+ );
148
+ }
149
+ `,
150
+ 'src/app/docs/layout.tsx': `/** @jsxImportSource preact */
151
+ import type { ComponentChildren } from 'preact';
152
+
153
+ export interface DocsLayoutProps {
154
+ children: ComponentChildren;
155
+ }
156
+
157
+ export default function DocsLayout({ children }: DocsLayoutProps) {
158
+ return (
159
+ <div class="flex min-h-screen">
160
+ <aside class="w-64 border-r border-slate-800 bg-[#070b13] p-6 space-y-4">
161
+ <div class="font-bold text-white text-base">Froot Docs</div>
162
+ <nav class="space-y-1 text-sm">
163
+ <a href="/docs" class="block py-1.5 px-3 rounded text-slate-300 hover:text-white hover:bg-slate-800/50">Overview</a>
164
+ <a href="/docs/quickstart" class="block py-1.5 px-3 rounded text-slate-300 hover:text-white hover:bg-slate-800/50">Quickstart</a>
165
+ </nav>
166
+ </aside>
167
+ <main class="flex-1 max-w-4xl p-10">
168
+ {children}
169
+ </main>
170
+ </div>
171
+ );
172
+ }
173
+ `,
174
+ 'src/app/docs/page.tsx': `/** @jsxImportSource preact */
175
+ import { getDoc } from 'frootkit';
176
+
177
+ export const metadata = {
178
+ title: 'Overview — FrootKit Docs',
179
+ description: 'Getting started with FrootKit Next.js Alternative.',
180
+ };
181
+
182
+ export default async function DocsOverviewPage() {
183
+ const { frontmatter, html } = await getDoc('overview');
184
+
185
+ return (
186
+ <div>
187
+ <div class="text-xs font-mono uppercase tracking-wider text-emerald-400 mb-2">
188
+ {frontmatter['category'] || 'Getting Started'}
189
+ </div>
190
+ <h1 class="text-3xl font-extrabold text-white mb-6">
191
+ {frontmatter['title'] || 'Overview'}
192
+ </h1>
193
+ <article
194
+ class="prose prose-invert max-w-none text-slate-300 space-y-4"
195
+ dangerouslySetInnerHTML={{ __html: html }}
196
+ />
197
+ </div>
198
+ );
199
+ }
200
+ `,
201
+ 'src/app/docs/[slug]/page.tsx': `/** @jsxImportSource preact */
202
+ import { getDoc } from 'frootkit';
203
+
204
+ export async function generateStaticParams() {
205
+ return [
206
+ { slug: 'overview' },
207
+ { slug: 'quickstart' },
208
+ ];
209
+ }
210
+
211
+ export async function generateMetadata({ params }: { params: { slug: string } }) {
212
+ const slug = params.slug || 'overview';
213
+ return {
214
+ title: \`\${slug.charAt(0).toUpperCase() + slug.slice(1)} — FrootKit Docs\`,
215
+ };
216
+ }
217
+
218
+ export default async function DocSlugPage({ params }: { params: { slug: string } }) {
219
+ const slug = params.slug || 'overview';
220
+ const { frontmatter, html } = await getDoc(slug);
221
+
222
+ return (
223
+ <div>
224
+ <div class="text-xs font-mono uppercase tracking-wider text-emerald-400 mb-2">
225
+ {frontmatter['category'] || 'Documentation'}
226
+ </div>
227
+ <h1 class="text-3xl font-extrabold text-white mb-6">
228
+ {frontmatter['title'] || slug}
229
+ </h1>
230
+ <article
231
+ class="prose prose-invert max-w-none text-slate-300 space-y-4"
232
+ dangerouslySetInnerHTML={{ __html: html }}
233
+ />
234
+ </div>
235
+ );
236
+ }
237
+ `,
238
+ 'content/docs/overview.md': `---
239
+ title: Overview
240
+ category: Getting Started
241
+ summary: Introduction to FrootKit Next.js Alternative architecture.
242
+ ---
243
+
244
+ Welcome to **FrootKit**, the high-performance Next.js alternative powered by Preact, Tailwind CSS v4, and Froot.
245
+
246
+ ## Design Principles
247
+ - **Next.js App Router Conventions:** Nested \`layout.tsx\`, dynamic parameters \`[slug]/page.tsx\`.
248
+ - **Preact SSR Engine:** Ultra-fast server-side JSX rendering with negligible overhead.
249
+ - **Tailwind CSS v4 Native:** CSS-first \`@theme\` variables with zero runtime scripts.
250
+ - **Instant SSG Prerendering:** Pre-renders all static and dynamic paths into \`.froot/\` in milliseconds.
251
+ `,
252
+ 'content/docs/quickstart.md': `---
253
+ title: Quickstart Guide
254
+ category: Getting Started
255
+ summary: Get up and running with FrootKit in less than 2 minutes.
256
+ ---
257
+
258
+ ## Running in Development
259
+ \`\`\`bash
260
+ npm run dev
261
+ \`\`\`
262
+ Your server will start with hot-reloading enabled on \`http://localhost:3000\`.
263
+
264
+ ## Production Build & Static Export
265
+ \`\`\`bash
266
+ npm run build
267
+ \`\`\`
268
+ All HTML pages and compiled Tailwind v4 CSS will be exported to \`.froot/\`.
269
+ `,
270
+ 'README.md': `# \${projectName}
271
+
272
+ A modern, high-performance web application built with **FrootKit** (Next.js Alternative with Preact SSR & Tailwind CSS v4).
273
+
274
+ ## Getting Started
275
+
276
+ \`\`\`bash
277
+ # Install dependencies
278
+ npm install
279
+
280
+ # Start development server
281
+ npm run dev
282
+
283
+ # Export production static site
284
+ npm run build
285
+
286
+ # Start production server
287
+ npm run start
288
+ \`\`\`
289
+ `,
290
+ };
291
+ }
292
+ export const generateFullstackTemplate = generateFrootKitTemplate;
293
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,UAAU,wBAAwB,CAAC,WAAmB;IAC1D,OAAO;QACL,cAAc,EAAE,IAAI,CAAC,SAAS,CAC5B;YACE,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,GAAG,EAAE,cAAc;gBACnB,KAAK,EAAE,gBAAgB;gBACvB,KAAK,EAAE,gBAAgB;aACxB;YACD,YAAY,EAAE;gBACZ,UAAU,EAAE,QAAQ;gBACpB,OAAO,EAAE,QAAQ;gBACjB,MAAM,EAAE,SAAS;gBACjB,yBAAyB,EAAE,QAAQ;aACpC;YACD,eAAe,EAAE;gBACf,kBAAkB,EAAE,QAAQ;gBAC5B,WAAW,EAAE,QAAQ;gBACrB,aAAa,EAAE,UAAU;gBACzB,UAAU,EAAE,QAAQ;aACrB;SACF,EACD,IAAI,EACJ,CAAC,CACF,GAAG,IAAI;QAER,eAAe,EAAE;;;;;;;;;;;;;CAapB;QAEG,YAAY,EAAE;;;;;;;;;;;;;;;CAejB;QAEG,gBAAgB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BrB;QAEG,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BzB;QAEG,kBAAkB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BvB;QAEG,yBAAyB,EAAE;;;;;;;;;;;;;;;;;;;;;;;CAuB9B;QAEG,uBAAuB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B5B;QAEG,8BAA8B,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCnC;QAEG,0BAA0B,EAAE;;;;;;;;;;;;;CAa/B;QAEG,4BAA4B,EAAE;;;;;;;;;;;;;;;;;CAiBjC;QAEG,WAAW,EAAE;;;;;;;;;;;;;;;;;;;CAmBhB;KACE,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,50 @@
1
1
  {
2
2
  "name": "create-frootkit",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Interactive CLI for scaffolding high-performance FrootKit (Next.js Alternative) applications",
5
+ "type": "module",
6
+ "bin": {
7
+ "create-frootkit": "./dist/index.js",
8
+ "create-froot-fullstack": "./dist/index.js"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "test": "node --test tests/*.test.ts"
15
+ },
16
+ "keywords": [
17
+ "froot",
18
+ "fullstack",
19
+ "nextjs",
20
+ "preact",
21
+ "tailwind",
22
+ "ssr",
23
+ "ssg",
24
+ "cli"
25
+ ],
26
+ "author": "OrbitNorth LLC",
27
+ "license": "MIT",
28
+ "files": [
29
+ "dist",
30
+ "README.md",
31
+ "LICENSE"
32
+ ],
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/orbitnorth/create-frootkit.git"
39
+ },
40
+ "homepage": "https://github.com/orbitnorth/create-frootkit#readme",
41
+ "bugs": {
42
+ "url": "https://github.com/orbitnorth/create-frootkit/issues"
43
+ },
44
+ "dependencies": {},
45
+ "devDependencies": {
46
+ "@types/node": "^22.10.0",
47
+ "typescript": "^5.8.0"
48
+ }
49
+ }
50
+