feat: support JSX automatic mode (#610)

This commit adds support for JSX automatic mode instead of the default
mode that requires the presence of the JSX pragma in each file.

This commit also adds the config file to the `fresh.gen.ts` manifest,
which is used to determine if the client emit should use automatic mode.

The minimum Deno version has also been bumped to 1.25.0.
This commit is contained in:
Luca Casonato
2022-08-26 11:03:00 +02:00
committed by GitHub
parent bbe4277acb
commit b12867a582
66 changed files with 374 additions and 213 deletions
+2 -5
View File
@@ -1,13 +1,10 @@
/** @jsx h */
/** @jsxFrag Fragment */
import { Fragment, h } from "preact";
import LemonDrop from "../islands/LemonDrop.tsx";
export function ServerCodePage(
props: { serverCode: number; codeDescription: string },
) {
return (
<Fragment>
<>
<section>
<div class="w-full flex justify-center items-center flex-col bg-green-300">
<LemonDrop />
@@ -26,7 +23,7 @@ export function ServerCodePage(
</p>
</div>
</section>
</Fragment>
</>
);
}
-3
View File
@@ -1,6 +1,3 @@
/** @jsx h */
/** @jsxFrag Fragment */
import { Fragment, h } from "preact";
import { Head } from "$fresh/runtime.ts";
import { Handlers, PageProps } from "$fresh/server.ts";
import { frontMatter, gfm } from "../../utils/markdown.ts";
+2 -5
View File
@@ -1,6 +1,3 @@
/** @jsx h */
/** @jsxFrag Fragment */
import { Fragment, h } from "preact";
import { asset, Head } from "$fresh/runtime.ts";
import { Handlers, PageProps } from "$fresh/server.ts";
import Counter from "../islands/Counter.tsx";
@@ -68,7 +65,7 @@ export default function MainPage(props: PageProps) {
function Hero() {
return (
<Fragment>
<>
<div class="flex justify-end items-center bg-green-300">
<a
href="/docs"
@@ -80,7 +77,7 @@ function Hero() {
<section class="w-full flex justify-center items-center flex-col bg-green-300">
<LemonDrop />
</section>
</Fragment>
</>
);
}