@flight-framework/cli 0.0.12 → 0.0.13

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.
Files changed (69) hide show
  1. package/README.md +77 -77
  2. package/dist/bin.js +416 -0
  3. package/dist/bin.js.map +1 -1
  4. package/dist/index.js +416 -0
  5. package/dist/index.js.map +1 -1
  6. package/package.json +53 -53
  7. package/templates/base/README.md.template +26 -26
  8. package/templates/base/_gitignore +25 -25
  9. package/templates/base/flight.config.ts.template +15 -15
  10. package/templates/base/styles/global.css +58 -58
  11. package/templates/htmx/index.html +18 -18
  12. package/templates/htmx/package.json.template +18 -18
  13. package/templates/htmx/vite.config.ts +6 -6
  14. package/templates/lit/index.html +14 -14
  15. package/templates/lit/package.json.template +21 -21
  16. package/templates/lit/src/app-root.ts +18 -18
  17. package/templates/lit/src/entry-client.ts +5 -5
  18. package/templates/lit/src/entry-server.ts +9 -9
  19. package/templates/lit/tsconfig.json +18 -18
  20. package/templates/lit/vite.config.ts +6 -6
  21. package/templates/preact/index.html +14 -14
  22. package/templates/preact/package.json.template +22 -22
  23. package/templates/preact/src/App.tsx +8 -8
  24. package/templates/preact/src/entry-client.tsx +11 -11
  25. package/templates/preact/src/entry-server.tsx +6 -6
  26. package/templates/preact/tsconfig.json +18 -18
  27. package/templates/preact/vite.config.ts +8 -8
  28. package/templates/qwik/index.html +14 -14
  29. package/templates/qwik/package.json.template +20 -20
  30. package/templates/qwik/src/App.tsx +10 -10
  31. package/templates/qwik/src/entry-client.tsx +4 -4
  32. package/templates/qwik/src/entry-server.tsx +9 -9
  33. package/templates/qwik/tsconfig.json +18 -18
  34. package/templates/qwik/vite.config.ts +8 -8
  35. package/templates/react/index.html +13 -13
  36. package/templates/react/package.json.template +24 -24
  37. package/templates/react/src/App.tsx +13 -13
  38. package/templates/react/src/context/RouterContext.tsx +63 -63
  39. package/templates/react/src/entry-client.tsx +19 -19
  40. package/templates/react/src/entry-server.tsx +17 -17
  41. package/templates/react/tsconfig.json +19 -19
  42. package/templates/react/vite.config.ts +12 -12
  43. package/templates/solid/index.html +14 -14
  44. package/templates/solid/package.json.template +21 -21
  45. package/templates/solid/src/App.tsx +8 -8
  46. package/templates/solid/src/entry-client.tsx +11 -11
  47. package/templates/solid/src/entry-server.tsx +6 -6
  48. package/templates/solid/tsconfig.json +18 -18
  49. package/templates/solid/vite.config.ts +8 -8
  50. package/templates/svelte/index.html +14 -14
  51. package/templates/svelte/package.json.template +21 -21
  52. package/templates/svelte/src/App.svelte +4 -4
  53. package/templates/svelte/src/entry-client.ts +7 -7
  54. package/templates/svelte/src/entry-server.ts +7 -7
  55. package/templates/svelte/tsconfig.json +17 -17
  56. package/templates/svelte/vite.config.ts +8 -8
  57. package/templates/vanilla/index.html +14 -14
  58. package/templates/vanilla/package.json.template +19 -19
  59. package/templates/vanilla/src/main.ts +10 -10
  60. package/templates/vanilla/tsconfig.json +16 -16
  61. package/templates/vanilla/vite.config.ts +6 -6
  62. package/templates/vue/index.html +14 -14
  63. package/templates/vue/package.json.template +21 -21
  64. package/templates/vue/src/App.vue +6 -6
  65. package/templates/vue/src/entry-client.ts +12 -12
  66. package/templates/vue/src/entry-server.ts +8 -8
  67. package/templates/vue/tsconfig.json +17 -17
  68. package/templates/vue/vite.config.ts +8 -8
  69. package/LICENSE +0 -21
@@ -1,26 +1,26 @@
1
- # {{PROJECT_NAME}}
2
-
3
- A Flight application.
4
-
5
- ## Development
6
-
7
- ```bash
8
- npm run dev
9
- ```
10
-
11
- ## Build
12
-
13
- ```bash
14
- npm run build
15
- npm run preview
16
- ```
17
-
18
- ## Stack
19
-
20
- - **UI**: {{UI_FRAMEWORK}}
21
- - **Build**: Vite 6
22
- - **Language**: {{LANGUAGE}}
23
-
24
- ---
25
-
26
- *Built with [Flight Framework](https://github.com/EliosLT/Flight-framework) - Maximum flexibility. Zero lock-in.*
1
+ # {{PROJECT_NAME}}
2
+
3
+ A Flight application.
4
+
5
+ ## Development
6
+
7
+ ```bash
8
+ npm run dev
9
+ ```
10
+
11
+ ## Build
12
+
13
+ ```bash
14
+ npm run build
15
+ npm run preview
16
+ ```
17
+
18
+ ## Stack
19
+
20
+ - **UI**: {{UI_FRAMEWORK}}
21
+ - **Build**: Vite 6
22
+ - **Language**: {{LANGUAGE}}
23
+
24
+ ---
25
+
26
+ *Built with [Flight Framework](https://github.com/EliosLT/Flight-framework) - Maximum flexibility. Zero lock-in.*
@@ -1,25 +1,25 @@
1
- # Dependencies
2
- node_modules/
3
-
4
- # Build output
5
- dist/
6
- .output/
7
-
8
- # Environment
9
- .env
10
- .env.*
11
- !.env.example
12
-
13
- # Logs
14
- *.log
15
- npm-debug.log*
16
-
17
- # Editor
18
- .vscode/
19
- .idea/
20
- *.swp
21
- *.swo
22
-
23
- # OS
24
- .DS_Store
25
- Thumbs.db
1
+ # Dependencies
2
+ node_modules/
3
+
4
+ # Build output
5
+ dist/
6
+ .output/
7
+
8
+ # Environment
9
+ .env
10
+ .env.*
11
+ !.env.example
12
+
13
+ # Logs
14
+ *.log
15
+ npm-debug.log*
16
+
17
+ # Editor
18
+ .vscode/
19
+ .idea/
20
+ *.swp
21
+ *.swo
22
+
23
+ # OS
24
+ .DS_Store
25
+ Thumbs.db
@@ -1,15 +1,15 @@
1
- // Flight Framework Configuration
2
- // Using {{BUNDLER}} bundler with {{UI_FRAMEWORK}} UI
3
-
4
- import { defineConfig } from '@flight-framework/core';
5
- import { {{BUNDLER}} } from '{{BUNDLER_PACKAGE}}';
6
-
7
- export default defineConfig({
8
- bundler: {{BUNDLER}}(),
9
- ui: {
10
- framework: '{{UI_FRAMEWORK}}',
11
- },
12
- rendering: {
13
- default: 'ssr',
14
- },
15
- });
1
+ // Flight Framework Configuration
2
+ // Using {{BUNDLER}} bundler with {{UI_FRAMEWORK}} UI
3
+
4
+ import { defineConfig } from '@flight-framework/core';
5
+ import { {{BUNDLER}} } from '{{BUNDLER_PACKAGE}}';
6
+
7
+ export default defineConfig({
8
+ bundler: {{BUNDLER}}(),
9
+ ui: {
10
+ framework: '{{UI_FRAMEWORK}}',
11
+ },
12
+ rendering: {
13
+ default: 'ssr',
14
+ },
15
+ });
@@ -1,58 +1,58 @@
1
- /* Flight - Minimal CSS */
2
-
3
- :root {
4
- --color-bg: #0a0a0f;
5
- --color-text: #f0f0f5;
6
- --color-muted: #8888a0;
7
- --color-primary: #6366f1;
8
- --font-sans: system-ui, -apple-system, sans-serif;
9
- --font-mono: 'Fira Code', monospace;
10
- }
11
-
12
- *, *::before, *::after {
13
- box-sizing: border-box;
14
- margin: 0;
15
- padding: 0;
16
- }
17
-
18
- body {
19
- font-family: var(--font-sans);
20
- background: var(--color-bg);
21
- color: var(--color-text);
22
- line-height: 1.6;
23
- min-height: 100vh;
24
- display: flex;
25
- align-items: center;
26
- justify-content: center;
27
- }
28
-
29
- main {
30
- text-align: center;
31
- padding: 2rem;
32
- }
33
-
34
- h1 {
35
- font-size: 2.5rem;
36
- margin-bottom: 1rem;
37
- }
38
-
39
- p {
40
- color: var(--color-muted);
41
- margin-bottom: 0.5rem;
42
- }
43
-
44
- code {
45
- font-family: var(--font-mono);
46
- background: rgba(99, 102, 241, 0.1);
47
- padding: 0.2rem 0.5rem;
48
- border-radius: 4px;
49
- color: var(--color-primary);
50
- }
51
-
52
- @media (prefers-color-scheme: light) {
53
- :root {
54
- --color-bg: #fafafa;
55
- --color-text: #1a1a2e;
56
- --color-muted: #64648a;
57
- }
58
- }
1
+ /* Flight - Minimal CSS */
2
+
3
+ :root {
4
+ --color-bg: #0a0a0f;
5
+ --color-text: #f0f0f5;
6
+ --color-muted: #8888a0;
7
+ --color-primary: #6366f1;
8
+ --font-sans: system-ui, -apple-system, sans-serif;
9
+ --font-mono: 'Fira Code', monospace;
10
+ }
11
+
12
+ *, *::before, *::after {
13
+ box-sizing: border-box;
14
+ margin: 0;
15
+ padding: 0;
16
+ }
17
+
18
+ body {
19
+ font-family: var(--font-sans);
20
+ background: var(--color-bg);
21
+ color: var(--color-text);
22
+ line-height: 1.6;
23
+ min-height: 100vh;
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ }
28
+
29
+ main {
30
+ text-align: center;
31
+ padding: 2rem;
32
+ }
33
+
34
+ h1 {
35
+ font-size: 2.5rem;
36
+ margin-bottom: 1rem;
37
+ }
38
+
39
+ p {
40
+ color: var(--color-muted);
41
+ margin-bottom: 0.5rem;
42
+ }
43
+
44
+ code {
45
+ font-family: var(--font-mono);
46
+ background: rgba(99, 102, 241, 0.1);
47
+ padding: 0.2rem 0.5rem;
48
+ border-radius: 4px;
49
+ color: var(--color-primary);
50
+ }
51
+
52
+ @media (prefers-color-scheme: light) {
53
+ :root {
54
+ --color-bg: #fafafa;
55
+ --color-text: #1a1a2e;
56
+ --color-muted: #64648a;
57
+ }
58
+ }
@@ -1,19 +1,19 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>{{PROJECT_NAME}}</title>
8
- <link rel="stylesheet" href="/src/styles/global.css" />
9
- <script src="https://unpkg.com/htmx.org@2.0.0"></script>
10
- </head>
11
-
12
- <body hx-boost="true">
13
- <main>
14
- <h1>Flight ✈️</h1>
15
- <p>Edit <code>index.html</code> to get started.</p>
16
- </main>
17
- </body>
18
-
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>{{PROJECT_NAME}}</title>
8
+ <link rel="stylesheet" href="/src/styles/global.css" />
9
+ <script src="https://unpkg.com/htmx.org@2.0.0"></script>
10
+ </head>
11
+
12
+ <body hx-boost="true">
13
+ <main>
14
+ <h1>Flight ✈️</h1>
15
+ <p>Edit <code>index.html</code> to get started.</p>
16
+ </main>
17
+ </body>
18
+
19
19
  </html>
@@ -1,18 +1,18 @@
1
- {
2
- "name": "{{PROJECT_NAME}}",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "flight dev",
8
- "build": "flight build",
9
- "preview": "flight preview"
10
- },
11
- "dependencies": {
12
- "@flight-framework/core": "^0.0.1",
13
- "{{BUNDLER_PACKAGE}}": "^0.0.1"
14
- },
15
- "devDependencies": {
16
- "vite": "^6.0.0"
17
- }
18
- }
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "flight dev",
8
+ "build": "flight build",
9
+ "preview": "flight preview"
10
+ },
11
+ "dependencies": {
12
+ "@flight-framework/core": "^0.0.1",
13
+ "{{BUNDLER_PACKAGE}}": "^0.0.1"
14
+ },
15
+ "devDependencies": {
16
+ "vite": "^6.0.0"
17
+ }
18
+ }
@@ -1,6 +1,6 @@
1
- import { defineConfig } from 'vite';
2
-
3
- export default defineConfig({
4
- server: { port: 5173 },
5
- build: { target: 'es2022' },
6
- });
1
+ import { defineConfig } from 'vite';
2
+
3
+ export default defineConfig({
4
+ server: { port: 5173 },
5
+ build: { target: 'es2022' },
6
+ });
@@ -1,15 +1,15 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>{{PROJECT_NAME}}</title>
8
- </head>
9
-
10
- <body>
11
- <div id="root"><!--ssr-outlet--></div>
12
- <script type="module" src="/src/entry-client.ts"></script>
13
- </body>
14
-
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>{{PROJECT_NAME}}</title>
8
+ </head>
9
+
10
+ <body>
11
+ <div id="root"><!--ssr-outlet--></div>
12
+ <script type="module" src="/src/entry-client.ts"></script>
13
+ </body>
14
+
15
15
  </html>
@@ -1,21 +1,21 @@
1
- {
2
- "name": "{{PROJECT_NAME}}",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "flight dev",
8
- "build": "flight build",
9
- "preview": "flight preview"
10
- },
11
- "dependencies": {
12
- "@flight-framework/core": "^0.0.1",
13
- "{{BUNDLER_PACKAGE}}": "^0.0.1",
14
- "lit": "^3.2.0"
15
- },
16
- "devDependencies": {
17
- "@lit-labs/ssr": "^3.3.0",
18
- "typescript": "^5.7.0",
19
- "vite": "^6.0.0"
20
- }
21
- }
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "flight dev",
8
+ "build": "flight build",
9
+ "preview": "flight preview"
10
+ },
11
+ "dependencies": {
12
+ "@flight-framework/core": "^0.0.1",
13
+ "{{BUNDLER_PACKAGE}}": "^0.0.1",
14
+ "lit": "^3.2.0"
15
+ },
16
+ "devDependencies": {
17
+ "@lit-labs/ssr": "^3.3.0",
18
+ "typescript": "^5.7.0",
19
+ "vite": "^6.0.0"
20
+ }
21
+ }
@@ -1,18 +1,18 @@
1
- import { LitElement, html, css } from 'lit';
2
- import { customElement } from 'lit/decorators.js';
3
-
4
- @customElement('app-root')
5
- export class AppRoot extends LitElement {
6
- static styles = css`
7
- :host { display: block; }
8
- `;
9
-
10
- render() {
11
- return html`
12
- <main>
13
- <h1>Flight ✈️</h1>
14
- <p>Edit <code>src/app-root.ts</code> to get started.</p>
15
- </main>
16
- `;
17
- }
18
- }
1
+ import { LitElement, html, css } from 'lit';
2
+ import { customElement } from 'lit/decorators.js';
3
+
4
+ @customElement('app-root')
5
+ export class AppRoot extends LitElement {
6
+ static styles = css`
7
+ :host { display: block; }
8
+ `;
9
+
10
+ render() {
11
+ return html`
12
+ <main>
13
+ <h1>Flight ✈️</h1>
14
+ <p>Edit <code>src/app-root.ts</code> to get started.</p>
15
+ </main>
16
+ `;
17
+ }
18
+ }
@@ -1,5 +1,5 @@
1
- import './app-root.js';
2
- import './styles/global.css';
3
-
4
- // Lit Web Components are self-hydrating via Declarative Shadow DOM
5
- console.log('Lit app ready');
1
+ import './app-root.js';
2
+ import './styles/global.css';
3
+
4
+ // Lit Web Components are self-hydrating via Declarative Shadow DOM
5
+ console.log('Lit app ready');
@@ -1,9 +1,9 @@
1
- import { render } from '@lit-labs/ssr';
2
- import { html } from 'lit';
3
- import { collectResult } from '@lit-labs/ssr/lib/render-result.js';
4
- import './app-root.js';
5
-
6
- export async function render(_url: string): Promise<string> {
7
- const result = render(html`<app-root></app-root>`);
8
- return collectResult(result);
9
- }
1
+ import { render } from '@lit-labs/ssr';
2
+ import { html } from 'lit';
3
+ import { collectResult } from '@lit-labs/ssr/lib/render-result.js';
4
+ import './app-root.js';
5
+
6
+ export async function render(_url: string): Promise<string> {
7
+ const result = render(html`<app-root></app-root>`);
8
+ return collectResult(result);
9
+ }
@@ -1,19 +1,19 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "lib": [
7
- "ES2022",
8
- "DOM"
9
- ],
10
- "strict": true,
11
- "noEmit": true,
12
- "skipLibCheck": true,
13
- "experimentalDecorators": true,
14
- "useDefineForClassFields": false
15
- },
16
- "include": [
17
- "src"
18
- ]
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": [
7
+ "ES2022",
8
+ "DOM"
9
+ ],
10
+ "strict": true,
11
+ "noEmit": true,
12
+ "skipLibCheck": true,
13
+ "experimentalDecorators": true,
14
+ "useDefineForClassFields": false
15
+ },
16
+ "include": [
17
+ "src"
18
+ ]
19
19
  }
@@ -1,6 +1,6 @@
1
- import { defineConfig } from 'vite';
2
-
3
- export default defineConfig({
4
- server: { port: 5173 },
5
- build: { target: 'es2022' },
6
- });
1
+ import { defineConfig } from 'vite';
2
+
3
+ export default defineConfig({
4
+ server: { port: 5173 },
5
+ build: { target: 'es2022' },
6
+ });
@@ -1,15 +1,15 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>{{PROJECT_NAME}}</title>
8
- </head>
9
-
10
- <body>
11
- <div id="root"><!--ssr-outlet--></div>
12
- <script type="module" src="/src/entry-client.tsx"></script>
13
- </body>
14
-
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>{{PROJECT_NAME}}</title>
8
+ </head>
9
+
10
+ <body>
11
+ <div id="root"><!--ssr-outlet--></div>
12
+ <script type="module" src="/src/entry-client.tsx"></script>
13
+ </body>
14
+
15
15
  </html>
@@ -1,22 +1,22 @@
1
- {
2
- "name": "{{PROJECT_NAME}}",
3
- "version": "0.0.1",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "flight dev",
8
- "build": "flight build",
9
- "preview": "flight preview"
10
- },
11
- "dependencies": {
12
- "@flight-framework/core": "^0.0.1",
13
- "{{BUNDLER_PACKAGE}}": "^0.0.1",
14
- "preact": "^10.25.0"
15
- },
16
- "devDependencies": {
17
- "@preact/preset-vite": "^2.9.0",
18
- "preact-render-to-string": "^6.5.0",
19
- "typescript": "^5.7.0",
20
- "vite": "^6.0.0"
21
- }
22
- }
1
+ {
2
+ "name": "{{PROJECT_NAME}}",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "flight dev",
8
+ "build": "flight build",
9
+ "preview": "flight preview"
10
+ },
11
+ "dependencies": {
12
+ "@flight-framework/core": "^0.0.1",
13
+ "{{BUNDLER_PACKAGE}}": "^0.0.1",
14
+ "preact": "^10.25.0"
15
+ },
16
+ "devDependencies": {
17
+ "@preact/preset-vite": "^2.9.0",
18
+ "preact-render-to-string": "^6.5.0",
19
+ "typescript": "^5.7.0",
20
+ "vite": "^6.0.0"
21
+ }
22
+ }
@@ -1,8 +1,8 @@
1
- export default function App() {
2
- return (
3
- <main>
4
- <h1>Flight ✈️</h1>
5
- <p>Edit <code>src/App.tsx</code> to get started.</p>
6
- </main>
7
- );
8
- }
1
+ export default function App() {
2
+ return (
3
+ <main>
4
+ <h1>Flight ✈️</h1>
5
+ <p>Edit <code>src/App.tsx</code> to get started.</p>
6
+ </main>
7
+ );
8
+ }
@@ -1,11 +1,11 @@
1
- import { hydrate, render } from 'preact';
2
- import App from './App';
3
- import './styles/global.css';
4
-
5
- const root = document.getElementById('root')!;
6
-
7
- if (root.innerHTML.trim()) {
8
- hydrate(<App />, root);
9
- } else {
10
- render(<App />, root);
11
- }
1
+ import { hydrate, render } from 'preact';
2
+ import App from './App';
3
+ import './styles/global.css';
4
+
5
+ const root = document.getElementById('root')!;
6
+
7
+ if (root.innerHTML.trim()) {
8
+ hydrate(<App />, root);
9
+ } else {
10
+ render(<App />, root);
11
+ }