create-l5e 0.1.1-alpha.1 → 0.1.1-alpha.3
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/package.json +1 -1
- package/templates/basic/package.json +3 -2
- package/templates/basic/src/views/actions/index.tsx +2 -4
- package/templates/basic/src/views/actions/loader.ts +5 -0
- package/templates/basic/src/views/home/index.tsx +2 -9
- package/templates/basic/src/views/home/loader.ts +10 -1
- package/templates/minimal/package.json +3 -2
- package/templates/minimal/src/views/home/index.tsx +2 -9
- package/templates/minimal/src/views/home/loader.ts +10 -1
package/package.json
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "tsx server.ts",
|
|
8
8
|
"build": "vite build && vite build --ssr src/entry-server.ts --outDir dist/server && vite build --ssr server.ts --outDir dist --emptyOutDir false",
|
|
9
|
-
"
|
|
9
|
+
"start": "cross-env NODE_ENV=production node dist/server.js",
|
|
10
|
+
"preview": "npm run build && npm run start",
|
|
10
11
|
"typecheck": "tsc --noEmit"
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
|
-
"@withl5e/l5e": "^0.1.1-alpha.
|
|
14
|
+
"@withl5e/l5e": "^0.1.1-alpha.3",
|
|
14
15
|
"react": "^19.0.0",
|
|
15
16
|
"react-dom": "^19.0.0"
|
|
16
17
|
},
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Fragment, useClientJs, useCss } from '@withl5e/l5e/jsx-runtime';
|
|
2
|
-
import { MetadataRenderer } from '@withl5e/l5e/seo';
|
|
3
2
|
|
|
4
3
|
export default function ActionsPage() {
|
|
5
4
|
useCss('./actions.css');
|
|
6
5
|
useClientJs('./client.ts');
|
|
7
6
|
|
|
8
7
|
return (
|
|
9
|
-
|
|
10
|
-
<MetadataRenderer metadata={{ title: 'Action + swap example' }} />
|
|
8
|
+
<Fragment>
|
|
11
9
|
<nav class="nav" aria-label="Primary">
|
|
12
10
|
<a href="/">Home</a>
|
|
13
11
|
<a href="/rewrite-demo">Rewrite demo</a>
|
|
@@ -27,6 +25,6 @@ export default function ActionsPage() {
|
|
|
27
25
|
</p>
|
|
28
26
|
</section>
|
|
29
27
|
</main>
|
|
30
|
-
|
|
28
|
+
</Fragment>
|
|
31
29
|
);
|
|
32
30
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment, useCss } from '@withl5e/l5e/jsx-runtime';
|
|
2
|
-
import { MetadataRenderer } from '@withl5e/l5e/seo';
|
|
3
2
|
|
|
4
3
|
import type { HomeLoaderData } from './loader';
|
|
5
4
|
|
|
@@ -7,13 +6,7 @@ export default function HomePage({ now }: HomeLoaderData) {
|
|
|
7
6
|
useCss('./home.css');
|
|
8
7
|
|
|
9
8
|
return (
|
|
10
|
-
|
|
11
|
-
<MetadataRenderer
|
|
12
|
-
metadata={{
|
|
13
|
-
title: 'L5E basic example',
|
|
14
|
-
description: 'A minimal L5E app with middleware rewrite and cache headers.',
|
|
15
|
-
}}
|
|
16
|
-
/>
|
|
9
|
+
<Fragment>
|
|
17
10
|
<nav class="nav" aria-label="Primary">
|
|
18
11
|
<a href="/">Home</a>
|
|
19
12
|
<a href="/rewrite-demo">Rewrite demo</a>
|
|
@@ -29,6 +22,6 @@ export default function HomePage({ now }: HomeLoaderData) {
|
|
|
29
22
|
<p class="timestamp">Rendered at {now}</p>
|
|
30
23
|
</section>
|
|
31
24
|
</main>
|
|
32
|
-
|
|
25
|
+
</Fragment>
|
|
33
26
|
);
|
|
34
27
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
GenerateMetadataFunction,
|
|
3
|
+
LoaderFunction,
|
|
4
|
+
LoaderResult,
|
|
5
|
+
} from '@withl5e/l5e/entry-server';
|
|
2
6
|
|
|
3
7
|
export type HomeLoaderData = {
|
|
4
8
|
now: string;
|
|
@@ -15,3 +19,8 @@ export const loader: LoaderFunction = async (): Promise<LoaderResult> => {
|
|
|
15
19
|
cacheTags: ['home'],
|
|
16
20
|
};
|
|
17
21
|
};
|
|
22
|
+
|
|
23
|
+
export const generateMetadata: GenerateMetadataFunction = () => ({
|
|
24
|
+
title: 'L5E basic example',
|
|
25
|
+
description: 'A minimal L5E app with middleware rewrite and cache headers.',
|
|
26
|
+
});
|
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "tsx server.ts",
|
|
8
8
|
"build": "vite build && vite build --ssr src/entry-server.ts --outDir dist/server && vite build --ssr server.ts --outDir dist --emptyOutDir false",
|
|
9
|
-
"
|
|
9
|
+
"start": "cross-env NODE_ENV=production node dist/server.js",
|
|
10
|
+
"preview": "npm run build && npm run start",
|
|
10
11
|
"typecheck": "tsc --noEmit"
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
|
-
"@withl5e/l5e": "^0.1.1-alpha.
|
|
14
|
+
"@withl5e/l5e": "^0.1.1-alpha.3",
|
|
14
15
|
"react": "^19.0.0",
|
|
15
16
|
"react-dom": "^19.0.0"
|
|
16
17
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Fragment, useCss } from '@withl5e/l5e/jsx-runtime';
|
|
2
|
-
import { MetadataRenderer } from '@withl5e/l5e/seo';
|
|
3
2
|
|
|
4
3
|
import type { HomeLoaderData } from './loader';
|
|
5
4
|
|
|
@@ -7,13 +6,7 @@ export default function HomePage({ now }: HomeLoaderData) {
|
|
|
7
6
|
useCss('./home.css');
|
|
8
7
|
|
|
9
8
|
return (
|
|
10
|
-
|
|
11
|
-
<MetadataRenderer
|
|
12
|
-
metadata={{
|
|
13
|
-
title: 'L5E starter',
|
|
14
|
-
description: 'A minimal L5E app.',
|
|
15
|
-
}}
|
|
16
|
-
/>
|
|
9
|
+
<Fragment>
|
|
17
10
|
<nav class="nav" aria-label="Primary">
|
|
18
11
|
<a href="/">Home</a>
|
|
19
12
|
</nav>
|
|
@@ -24,6 +17,6 @@ export default function HomePage({ now }: HomeLoaderData) {
|
|
|
24
17
|
<p class="timestamp">Rendered at {now}</p>
|
|
25
18
|
</section>
|
|
26
19
|
</main>
|
|
27
|
-
|
|
20
|
+
</Fragment>
|
|
28
21
|
);
|
|
29
22
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
GenerateMetadataFunction,
|
|
3
|
+
LoaderFunction,
|
|
4
|
+
LoaderResult,
|
|
5
|
+
} from '@withl5e/l5e/entry-server';
|
|
2
6
|
|
|
3
7
|
export type HomeLoaderData = {
|
|
4
8
|
now: string;
|
|
@@ -15,3 +19,8 @@ export const loader: LoaderFunction = async (): Promise<LoaderResult> => {
|
|
|
15
19
|
cacheTags: ['home'],
|
|
16
20
|
};
|
|
17
21
|
};
|
|
22
|
+
|
|
23
|
+
export const generateMetadata: GenerateMetadataFunction = () => ({
|
|
24
|
+
title: 'L5E starter',
|
|
25
|
+
description: 'A minimal L5E app.',
|
|
26
|
+
});
|