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
+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";