feat: import fresh from fresh (#2479)

Instead of importing as `@fresh/core`.
This commit is contained in:
Luca Casonato
2024-06-05 14:51:35 +02:00
committed by GitHub
parent 19d3e452ac
commit c3ec742a65
39 changed files with 89 additions and 89 deletions
+4 -4
View File
@@ -37,10 +37,10 @@
"$marked-mangle": "https://esm.sh/marked-mangle@1.0.1",
"$std/": "https://deno.land/std@0.216.0/",
"@astral/astral": "jsr:@astral/astral@^0.4.0",
"@fresh/core": "./src/mod.ts",
"@fresh/core/compat": "./src/compat/mod.ts",
"@fresh/core/dev": "./src/dev/mod.ts",
"@fresh/core/runtime": "./src/runtime/shared.ts",
"fresh": "./src/mod.ts",
"fresh/compat": "./src/compat/mod.ts",
"fresh/dev": "./src/dev/mod.ts",
"fresh/runtime": "./src/runtime/shared.ts",
"@fresh/plugin-tailwind": "./plugin-tailwindcss/src/mod.ts",
"@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader@^0.10.3",
"@preact/signals": "npm:@preact/signals@^1.2.3",
+5 -5
View File
@@ -21,7 +21,7 @@ deno run -Ar jsr:@fresh/update
This will apply most API changes made in Fresh 2
[automatically](#automatic-updates) like changing `$fresh/server.ts` imports to
`@fresh/core`.
`fresh`.
## Getting `main.ts` and `dev.ts` ready
@@ -51,7 +51,7 @@ plugins like [tailwindcss](https://tailwindcss.com/).
The full `dev.ts` file for newly generated Fresh 2 projects looks like this:
```ts
import { Builder } from "@fresh/core/dev";
import { Builder } from "fresh/dev";
import { tailwind } from "@fresh/plugin-tailwind";
import { app } from "./main.ts";
@@ -78,7 +78,7 @@ Similarly, configuration related to running Fresh in production can be passed to
```ts
// main.ts
import { App, fsRoutes, staticFiles } from "@fresh/core";
import { App, fsRoutes, staticFiles } from "fresh";
export const app = new App()
// Add static file serving middleware
@@ -178,8 +178,8 @@ you can add if needed. This middleware can be used to ensure that URLs always
have a trailing slash at the end or that they will never have one.
```diff
- import { App, staticFiles } from "@fresh/core";
+ import { App, staticFiles, trailingSlashes } from "@fresh/core";
- import { App, staticFiles } from "fresh";
+ import { App, staticFiles, trailingSlashes } from "fresh";
export const app = new App({ root: import.meta.url })
.use(staticFiles())
+5 -5
View File
@@ -367,7 +367,7 @@ ${GRADIENT_CSS}
// Skip this and be silent if there is a network issue.
}
const MAIN_TS = `import { App, staticFiles, fsRoutes } from "@fresh/core";
const MAIN_TS = `import { App, staticFiles, fsRoutes } from "fresh";
import { State } from "./utils.ts";
export const app = new App<State>();
@@ -406,7 +406,7 @@ export function Button(props: ButtonProps) {
`;
await writeFile("components/Button.tsx", COMPONENTS_BUTTON_TSX);
const UTILS_TS = `import { createDefine } from "@fresh/core";
const UTILS_TS = `import { createDefine } from "fresh";
// deno-lint-ignore no-empty-interface
export interface State {}
@@ -444,7 +444,7 @@ export default define.page(function Home() {
})`;
await writeFile("routes/index.tsx", ROUTES_HOME);
const APP_WRAPPER = `import { type PageProps } from "@fresh/core";
const APP_WRAPPER = `import { type PageProps } from "fresh";
export default function App({ Component }: PageProps) {
return (
@@ -484,7 +484,7 @@ export default function Counter(props: CounterProps) {
const DEV_TS = `#!/usr/bin/env -S deno run -A --watch=static/,routes/
${useTailwind ? `import { tailwind } from "@fresh/plugin-tailwind";\n` : ""};
import { Builder } from "@fresh/core/dev";
import { Builder } from "fresh/dev";
import { app } from "./main.ts";
const builder = new Builder();
@@ -514,7 +514,7 @@ if (Deno.args.includes("build")) {
},
exclude: ["**/_fresh/*"],
imports: {
"@fresh/core": `jsr:@fresh/core@^${FRESH_VERSION}`,
"fresh": `jsr:@fresh/core@^${FRESH_VERSION}`,
"@fresh/plugin-tailwind":
`jsr:@fresh/plugin-tailwind@^${FRESH_TAILWIND_VERSION}`,
"preact": `npm:preact@^${PREACT_VERSION}`,
+2 -2
View File
@@ -29,8 +29,8 @@ async function patchProject(dir: string): Promise<void> {
);
json.imports = rootJson.imports;
json.imports["@fresh/core"] = "../src/mod.ts";
json.imports["@fresh/core/dev"] = "../src/dev/mod.ts";
json.imports["fresh"] = "../src/mod.ts";
json.imports["fresh/dev"] = "../src/dev/mod.ts";
json.imports["@fresh/plugin-tailwind"] = "../plugin-tailwindcss/mod.ts";
await Deno.writeTextFile(jsonPath, JSON.stringify(json, null, 2));
+1 -1
View File
@@ -6,7 +6,7 @@ A Tailwind CSS plugin to use in Fresh.
// dev.ts
import { tailwind } from "@fresh/plugin-tailwind";
import { FreshDevApp } from "@fresh/core/dev";
import { FreshDevApp } from "fresh/dev";
import { app } from "./main.ts";
const devApp = new FreshDevApp();
+1 -1
View File
@@ -5,7 +5,7 @@
".": "./src/mod.ts"
},
"imports": {
"@fresh/core": "jsr:@fresh/core@^2.0.0-alpha.1",
"fresh": "jsr:@fresh/core@^2.0.0-alpha.1",
"@std/path": "jsr:@std/path@^0.221.0",
"autoprefixer": "npm:autoprefixer@10.4.17",
"cssnano": "npm:cssnano@6.0.3",
+1 -1
View File
@@ -4,7 +4,7 @@ import cssnano from "cssnano";
import autoprefixer from "autoprefixer";
import * as path from "@std/path";
import type { TailwindPluginOptions } from "./types.ts";
import type { ResolvedFreshConfig } from "@fresh/core";
import type { ResolvedFreshConfig } from "fresh";
const CONFIG_EXTENSIONS = ["ts", "js", "mjs"];
+2 -2
View File
@@ -1,7 +1,7 @@
import type { TailwindPluginOptions } from "./types.ts";
import { initTailwind } from "./compiler.ts";
import type { Builder } from "@fresh/core/dev";
import type { App } from "@fresh/core";
import type { Builder } from "fresh/dev";
import type { App } from "fresh";
export function tailwind<T>(
builder: Builder,
+2 -2
View File
@@ -1,7 +1,7 @@
import { expect } from "@std/expect";
import { FreshReqContext } from "./context.ts";
import { App } from "@fresh/core";
import { asset } from "@fresh/core/runtime";
import { App } from "fresh";
import { asset } from "fresh/runtime";
import { FakeServer } from "./test_utils.ts";
import { BUILD_ID } from "./runtime/build_id.ts";
import { parseHtml } from "../tests/test_utils.tsx";
+2 -2
View File
@@ -34,7 +34,7 @@ export interface Define<State> {
* returned from the handler is of the correct type:
*
* ```ts
* import { page } from "@fresh/core";
* import { page } from "fresh";
* import { define } from "../utils.ts";
*
* export const handler = define.handlers<{ slug: string }>({
@@ -80,7 +80,7 @@ export interface Define<State> {
* return type of the handler method.
*
* ```ts
* import { page } from "@fresh/core";
* import { page } from "fresh";
* import { define } from "../utils.ts";
*
* export const handler = define.handlers({
+1 -1
View File
@@ -1,6 +1,6 @@
import * as path from "@std/path";
import { contentType as getContentType } from "@std/media-types/content-type";
import type { MiddlewareFn } from "@fresh/core";
import type { MiddlewareFn } from "fresh";
import { ASSET_CACHE_BUST_KEY } from "../runtime/shared_internal.tsx";
import { BUILD_ID } from "../runtime/build_id.ts";
import { getBuildCache } from "../context.ts";
+2 -2
View File
@@ -1,4 +1,4 @@
import { App, staticFiles } from "@fresh/core";
import { App, staticFiles } from "fresh";
import {
allIslandApp,
assertNotSelector,
@@ -14,7 +14,7 @@ import { SelfCounter } from "./fixtures_islands/SelfCounter.tsx";
import { PartialInIsland } from "./fixtures_islands/PartialInIsland.tsx";
import { JsonIsland } from "./fixtures_islands/JsonIsland.tsx";
import { FakeServer } from "../src/test_utils.ts";
import { Partial } from "@fresh/core/runtime";
import { Partial } from "fresh/runtime";
import { getBuildCache, setBuildCache } from "../src/app.ts";
await buildProd(allIslandApp);
+1 -1
View File
@@ -1,6 +1,6 @@
import { useEffect } from "preact/hooks";
import { useSignal } from "@preact/signals";
import { IS_BROWSER } from "@fresh/core/runtime";
import { IS_BROWSER } from "fresh/runtime";
export function NodeProcess() {
const active = useSignal(false);
+1 -1
View File
@@ -1,4 +1,4 @@
import { Partial } from "@fresh/core/runtime";
import { Partial } from "fresh/runtime";
export function PartialInIsland() {
return (
+1 -1
View File
@@ -1,4 +1,4 @@
import { App, fsRoutes } from "@fresh/core";
import { App, fsRoutes } from "fresh";
import { Counter } from "./fixtures_islands/Counter.tsx";
import { IslandInIsland } from "./fixtures_islands/IslandInIsland.tsx";
import { JsonIsland } from "./fixtures_islands/JsonIsland.tsx";
+2 -2
View File
@@ -1,5 +1,5 @@
import { App, staticFiles } from "@fresh/core";
import { Partial } from "@fresh/core/runtime";
import { App, staticFiles } from "fresh";
import { Partial } from "fresh/runtime";
import {
allIslandApp,
assertMetaContent,
+6 -6
View File
@@ -83,7 +83,7 @@ export async function updateProject(dir: string) {
config.imports = {};
}
config.imports["@fresh/core"] = `jsr:@fresh/core@^${FRESH_VERSION}`;
config.imports["fresh"] = `jsr:@fresh/core@^${FRESH_VERSION}`;
config.imports["preact"] = `npm:preact@^${PREACT_VERSION}`;
config.imports["@preact/signals"] =
`npm:@preact/signals@^${PREACT_SIGNALS_VERSION}`;
@@ -233,7 +233,7 @@ async function updateFile(sourceFile: tsmorph.SourceFile): Promise<void> {
removeEmptyImport(d);
} else if (specifier === "$fresh/server.ts") {
hasCoreImport = true;
d.setModuleSpecifier("@fresh/core");
d.setModuleSpecifier("fresh");
for (const n of d.getNamedImports()) {
const name = n.getName();
@@ -252,7 +252,7 @@ async function updateFile(sourceFile: tsmorph.SourceFile): Promise<void> {
removeEmptyImport(d);
} else if (specifier === "$fresh/runtime.ts") {
hasRuntimeImport = true;
d.setModuleSpecifier("@fresh/core/runtime");
d.setModuleSpecifier("fresh/runtime");
for (const n of d.getNamedImports()) {
const name = n.getName();
@@ -270,19 +270,19 @@ async function updateFile(sourceFile: tsmorph.SourceFile): Promise<void> {
if (!hasCoreImport && newImports.core.size > 0) {
sourceFile.addImportDeclaration({
moduleSpecifier: "@fresh/core",
moduleSpecifier: "fresh",
namedImports: Array.from(newImports.core),
});
}
if (!hasRuntimeImport && newImports.runtime.size > 0) {
sourceFile.addImportDeclaration({
moduleSpecifier: "@fresh/core/runtime",
moduleSpecifier: "fresh/runtime",
namedImports: Array.from(newImports.core),
});
}
if (newImports.compat.size > 0) {
sourceFile.addImportDeclaration({
moduleSpecifier: "@fresh/core/compat",
moduleSpecifier: "fresh/compat",
namedImports: Array.from(newImports.compat),
});
}
+20 -20
View File
@@ -82,7 +82,7 @@ Deno.test("update - 1.x project deno.json", async () => {
expect(JSON.parse(files["/deno.json"]))
.toEqual({
imports: {
"@fresh/core": `jsr:@fresh/core@^${FRESH_VERSION}`,
"fresh": `jsr:@fresh/core@^${FRESH_VERSION}`,
"@preact/signals": `npm:@preact/signals@^${PREACT_SIGNALS_VERSION}`,
"preact": `npm:preact@^${PREACT_VERSION}`,
},
@@ -106,7 +106,7 @@ Deno.test("update - 1.x project deno.json with imports", async () => {
expect(JSON.parse(files["/deno.json"]))
.toEqual({
imports: {
"@fresh/core": `jsr:@fresh/core@^${FRESH_VERSION}`,
"fresh": `jsr:@fresh/core@^${FRESH_VERSION}`,
"@preact/signals": `npm:@preact/signals@^${PREACT_SIGNALS_VERSION}`,
"preact": `npm:preact@^${PREACT_VERSION}`,
},
@@ -141,7 +141,7 @@ export async function handler(
const files = await readFiles(dir);
expect(files["/routes/_middleware.ts"])
.toEqual(`import { FreshContext } from "@fresh/core";
.toEqual(`import { FreshContext } from "fresh";
interface State {
data: string;
@@ -174,7 +174,7 @@ Deno.test("update - 1.x project middlewares one arg", async () => {
const files = await readFiles(dir);
expect(files["/routes/_middleware.ts"])
.toEqual(`import { FreshContext } from "@fresh/core";
.toEqual(`import { FreshContext } from "fresh";
export async function handler(ctx: FreshContext) {
const req = ctx.req;
@@ -199,12 +199,12 @@ export default function Foo(props: PageProps) {
const files = await readFiles(dir);
expect(files["/routes/index.tsx"])
.toEqual(`import { PageProps } from "@fresh/core";
.toEqual(`import { PageProps } from "fresh";
export default function Foo(props: PageProps) {
return null;
}`);
expect(files["/routes/foo.tsx"])
.toEqual(`import { asset, Head } from "@fresh/core/runtime";`);
.toEqual(`import { asset, Head } from "fresh/runtime";`);
});
});
@@ -254,7 +254,7 @@ export const handler: Handlers = {
const files = await readFiles(dir);
expect(files["/routes/index.tsx"])
.toEqual(`import { Handlers } from "@fresh/core/compat";
.toEqual(`import { Handlers } from "fresh/compat";
export const handler: Handlers = {
async GET(ctx) {
@@ -274,7 +274,7 @@ export const handler: Handlers = {
},
};`);
expect(files["/routes/foo.tsx"])
.toEqual(`import { Handlers } from "@fresh/core/compat";
.toEqual(`import { Handlers } from "fresh/compat";
export const handler: Handlers = {
async GET(ctx) {},
@@ -285,7 +285,7 @@ export const handler: Handlers = {
};`);
expect(files["/routes/name.tsx"])
.toEqual(`import { Handlers } from "@fresh/core/compat";
.toEqual(`import { Handlers } from "fresh/compat";
export const handler: Handlers = {
async GET(ctx) {
@@ -305,7 +305,7 @@ export const handler: Handlers = {
},
};`);
expect(files["/routes/name-unused.tsx"])
.toEqual(`import { Handlers } from "@fresh/core/compat";
.toEqual(`import { Handlers } from "fresh/compat";
export const handler: Handlers = {
async GET(ctx) {},
@@ -393,7 +393,7 @@ Deno.test(
await updateProject(dir);
const files = await readFiles(dir);
expect(files["/routes/index.tsx"])
.toEqual(`import { FreshContext } from "@fresh/core";
.toEqual(`import { FreshContext } from "fresh";
export const handler = {
GET(ctx: FreshContext) {
@@ -425,7 +425,7 @@ export const handler: Handlers = {
await updateProject(dir);
const files = await readFiles(dir);
expect(files["/routes/index.tsx"])
.toEqual(`import { Handlers } from "@fresh/core/compat";
.toEqual(`import { Handlers } from "fresh/compat";
export const handler: Handlers = {
async GET({ params, render, info, req }) {
@@ -470,7 +470,7 @@ export default defineRoute(async (req, ctx) => {
const files = await readFiles(dir);
expect(files["/routes/_app.tsx"])
.toEqual(`import { defineApp } from "@fresh/core/compat";
.toEqual(`import { defineApp } from "fresh/compat";
export default defineApp(async (ctx) => {
const req = ctx.req;
@@ -478,7 +478,7 @@ export default defineApp(async (ctx) => {
return null;
});`);
expect(files["/routes/_layout.tsx"])
.toEqual(`import { defineLayout } from "@fresh/core/compat";
.toEqual(`import { defineLayout } from "fresh/compat";
export default defineLayout(async (ctx) => {
const req = ctx.req;
@@ -486,7 +486,7 @@ export default defineLayout(async (ctx) => {
return null;
});`);
expect(files["/routes/foo.tsx"])
.toEqual(`import { defineRoute } from "@fresh/core/compat";
.toEqual(`import { defineRoute } from "fresh/compat";
export default defineRoute(async (ctx) => {
const req = ctx.req;
@@ -517,7 +517,7 @@ Deno.test(
await updateProject(dir);
const files = await readFiles(dir);
expect(files["/routes/index.tsx"])
.toEqual(`import { FreshContext } from "@fresh/core";
.toEqual(`import { FreshContext } from "fresh";
export default async function Index(ctx: FreshContext) {
const req = ctx.req;
@@ -557,7 +557,7 @@ export const handler: Handlers = {
const files = await readFiles(dir);
expect(files["/routes/index.tsx"])
.toEqual(`import { Handlers } from "@fresh/core";
.toEqual(`import { Handlers } from "fresh";
export const handler: Handlers = {
async GET(ctx) {
@@ -594,7 +594,7 @@ export const handler: Handlers = {
const files = await readFiles(dir);
expect(files["/routes/index.tsx"])
.toEqual(`import { Handlers } from "@fresh/core";
.toEqual(`import { Handlers } from "fresh";
export const handler: Handlers = {
async GET(ctx) {
@@ -629,7 +629,7 @@ export const handler: Handlers = {
const files = await readFiles(dir);
expect(files["/routes/index.tsx"])
.toEqual(`import { Handlers } from "@fresh/core";
.toEqual(`import { Handlers } from "fresh";
export const handler: Handlers = {
async GET({ url, throw, info }) {
@@ -677,7 +677,7 @@ Deno.test("update - island files", async () => {
const files = await readFiles(dir);
expect(files["/islands/foo.tsx"]).toEqual(
`import { IS_BROWSER } from "@fresh/core/runtime";`,
`import { IS_BROWSER } from "fresh/runtime";`,
);
});
});
+1 -1
View File
@@ -1,4 +1,4 @@
import { Partial } from "@fresh/core/runtime";
import { Partial } from "fresh/runtime";
export const RecipeDemo = () => (
<div
+4 -4
View File
@@ -10,10 +10,10 @@
"$ga4": "https://raw.githubusercontent.com/denoland/ga4/main/mod.ts",
"$marked-mangle": "https://esm.sh/marked-mangle@1.1.7",
"$std/": "https://deno.land/std@0.216.0/",
"@fresh/core": "../src/mod.ts",
"@fresh/core/dev": "../src/dev/mod.ts",
"@fresh/core/runtime": "../src/runtime/shared.ts",
"@fresh/core/compat": "../src/compat/mod.ts",
"fresh": "../src/mod.ts",
"fresh/dev": "../src/dev/mod.ts",
"fresh/runtime": "../src/runtime/shared.ts",
"fresh/compat": "../src/compat/mod.ts",
"@fresh/plugin-tailwind": "../plugin-tailwindcss/src/mod.ts",
"@luca/esbuild-deno-loader": "jsr:@luca/esbuild-deno-loader@^0.10.3",
"@preact/signals": "npm:@preact/signals@^1.2.3",
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env -S deno run -A --watch=static/,routes/
import { Builder } from "@fresh/core/dev";
import { Builder } from "fresh/dev";
import { app } from "./main.ts";
import { tailwind } from "@fresh/plugin-tailwind";
+1 -1
View File
@@ -1,5 +1,5 @@
import { useEffect } from "preact/hooks";
import { IS_BROWSER } from "@fresh/core/runtime";
import { IS_BROWSER } from "fresh/runtime";
import * as Icons from "../components/Icons.tsx";
import { useSignal } from "@preact/signals";
+1 -1
View File
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Deno authors. All rights reserved. MIT license.
import { IS_BROWSER } from "@fresh/core/runtime";
import { IS_BROWSER } from "fresh/runtime";
import type { VersionLink } from "../routes/docs/[...slug].tsx";
export default function VersionSelect(
+1 -1
View File
@@ -1,4 +1,4 @@
import { App, fsRoutes, staticFiles, trailingSlashes } from "@fresh/core";
import { App, fsRoutes, staticFiles, trailingSlashes } from "fresh";
export const app = new App({ root: import.meta.url })
.use(staticFiles())
+1 -1
View File
@@ -1,4 +1,4 @@
import { asset } from "@fresh/core/runtime";
import { asset } from "fresh/runtime";
import { define } from "../utils/state.ts";
export default define.page(function App({ Component, state, url }) {
+1 -1
View File
@@ -1,4 +1,4 @@
import { HttpError, type PageProps } from "@fresh/core";
import { HttpError, type PageProps } from "fresh";
import LemonDrop from "../islands/LemonDrop.tsx";
export function ServerCodePage(
+1 -1
View File
@@ -1,4 +1,4 @@
import type { FreshContext } from "@fresh/core";
import type { FreshContext } from "fresh";
import type { Event } from "$ga4";
import { GA4Report, isDocument, isServerError } from "$ga4";
+2 -2
View File
@@ -1,5 +1,5 @@
import { HttpError, page } from "@fresh/core";
import { asset, Partial } from "@fresh/core/runtime";
import { HttpError, page } from "fresh";
import { asset, Partial } from "fresh/runtime";
import { SidebarCategory } from "../../components/DocsSidebar.tsx";
import Footer from "../../components/Footer.tsx";
import Header from "../../components/Header.tsx";
+1 -1
View File
@@ -1,4 +1,4 @@
import type { FreshContext } from "@fresh/core";
import type { FreshContext } from "fresh";
const REDIRECTS: Record<string, string> = {
"/docs/getting-started/fetching-data":
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Handlers } from "@fresh/core/compat";
import type { Handlers } from "fresh/compat";
export const handler: Handlers<void> = {
GET(ctx) {
+2 -2
View File
@@ -1,5 +1,5 @@
import { asset } from "@fresh/core/runtime";
import { page } from "@fresh/core";
import { asset } from "fresh/runtime";
import { page } from "fresh";
import VERSIONS from "../../versions.json" with { type: "json" };
import Footer from "../components/Footer.tsx";
import Header from "../components/Header.tsx";
+1 -1
View File
@@ -1,4 +1,4 @@
import type { RouteConfig } from "@fresh/core";
import type { RouteConfig } from "fresh";
import { format, parse } from "$std/semver/mod.ts";
import VERSIONS from "../../versions.json" with { type: "json" };
import { extname } from "$std/path/mod.ts";
+1 -1
View File
@@ -1,4 +1,4 @@
import type { PageProps } from "@fresh/core";
import type { PageProps } from "fresh";
import Header from "../../components/Header.tsx";
export default function Layout({ Component }: PageProps) {
+2 -2
View File
@@ -1,5 +1,5 @@
import { Partial } from "@fresh/core/runtime";
import type { RouteConfig } from "@fresh/core";
import { Partial } from "fresh/runtime";
import type { RouteConfig } from "fresh";
export const config: RouteConfig = {
skipAppWrapper: true,
+2 -2
View File
@@ -1,5 +1,5 @@
import { Partial } from "@fresh/core/runtime";
import type { RouteConfig } from "@fresh/core";
import { Partial } from "fresh/runtime";
import type { RouteConfig } from "fresh";
export const config: RouteConfig = {
skipAppWrapper: true,
+2 -2
View File
@@ -1,5 +1,5 @@
import { Partial } from "@fresh/core/runtime";
import type { RouteConfig } from "@fresh/core";
import { Partial } from "fresh/runtime";
import type { RouteConfig } from "fresh";
export const config: RouteConfig = {
skipAppWrapper: true,
+2 -2
View File
@@ -1,5 +1,5 @@
import { asset } from "@fresh/core/runtime";
import { page } from "@fresh/core";
import { asset } from "fresh/runtime";
import { page } from "fresh";
import Projects, { type Project } from "../components/Projects.tsx";
import Header from "../components/Header.tsx";
import Footer from "../components/Footer.tsx";
+1 -1
View File
@@ -1,4 +1,4 @@
import { page } from "@fresh/core";
import { page } from "fresh";
import { PageSection } from "../components/PageSection.tsx";
import { DemoBox } from "../components/homepage/DemoBox.tsx";
import { define } from "../utils/state.ts";
+1 -1
View File
@@ -1,4 +1,4 @@
import { createDefine } from "@fresh/core";
import { createDefine } from "fresh";
export interface State {
title?: string;