diff --git a/packages/fresh/src/context_test.tsx b/packages/fresh/src/context_test.tsx index de94d900e6a..00f145ab6d2 100644 --- a/packages/fresh/src/context_test.tsx +++ b/packages/fresh/src/context_test.tsx @@ -1,7 +1,6 @@ import { expect } from "@std/expect"; import { Context } from "./context.ts"; -import { App } from "fresh"; -import { asset } from "fresh/runtime"; +import { App, asset } from "fresh"; import { FakeServer } from "./test_utils.ts"; import { BUILD_ID } from "@fresh/build-id"; import { parseHtml } from "../tests/test_utils.tsx"; diff --git a/packages/fresh/src/mod.ts b/packages/fresh/src/mod.ts index a6cd6be0ed5..db056ec4cc9 100644 --- a/packages/fresh/src/mod.ts +++ b/packages/fresh/src/mod.ts @@ -1,3 +1,10 @@ +export { + asset, + assetSrcSet, + IS_BROWSER, + Partial, + type PartialProps, +} from "@fresh/core/runtime"; export { App, type ListenOptions } from "./app.ts"; export { trailingSlashes } from "./middlewares/trailing_slashes.ts"; export { diff --git a/packages/fresh/tests/active_links_test.tsx b/packages/fresh/tests/active_links_test.tsx index 2d5262e8a07..7b86fd15c43 100644 --- a/packages/fresh/tests/active_links_test.tsx +++ b/packages/fresh/tests/active_links_test.tsx @@ -1,4 +1,4 @@ -import { App, staticFiles } from "fresh"; +import { App, Partial, staticFiles } from "fresh"; import { ALL_ISLAND_DIR, assertNotSelector, @@ -10,7 +10,6 @@ import { } from "./test_utils.tsx"; import { FakeServer } from "../src/test_utils.ts"; -import { Partial } from "fresh/runtime"; const allIslandCache = await buildProd({ islandDir: ALL_ISLAND_DIR }); diff --git a/packages/fresh/tests/partials_test.tsx b/packages/fresh/tests/partials_test.tsx index 2e8770c6a56..3b0c62f1c62 100644 --- a/packages/fresh/tests/partials_test.tsx +++ b/packages/fresh/tests/partials_test.tsx @@ -1,5 +1,4 @@ -import { App, staticFiles } from "fresh"; -import { Partial } from "fresh/runtime"; +import { App, Partial, staticFiles } from "fresh"; import { ALL_ISLAND_DIR, assertMetaContent, diff --git a/www/routes/docs/[...slug].tsx b/www/routes/docs/[...slug].tsx index e5821e379bb..d8b7571000e 100644 --- a/www/routes/docs/[...slug].tsx +++ b/www/routes/docs/[...slug].tsx @@ -1,5 +1,4 @@ -import { HttpError, page } from "fresh"; -import { asset, Partial } from "fresh/runtime"; +import { asset, HttpError, page, Partial } from "fresh"; import { SidebarCategory } from "../../components/DocsSidebar.tsx"; import Footer from "../../components/Footer.tsx"; import Header from "../../components/Header.tsx"; diff --git a/www/routes/index.tsx b/www/routes/index.tsx index 5732fc71f06..60fbab88d76 100644 --- a/www/routes/index.tsx +++ b/www/routes/index.tsx @@ -1,5 +1,4 @@ -import { asset } from "fresh/runtime"; -import { page } from "fresh"; +import { asset, page } from "fresh"; import VERSIONS from "../../versions.json" with { type: "json" }; import Footer from "../components/Footer.tsx"; import Header from "../components/Header.tsx"; diff --git a/www/routes/recipes/lemon-honey-tea.tsx b/www/routes/recipes/lemon-honey-tea.tsx index 3f9d4b3021b..ed123af8a86 100644 --- a/www/routes/recipes/lemon-honey-tea.tsx +++ b/www/routes/recipes/lemon-honey-tea.tsx @@ -1,5 +1,4 @@ -import { Partial } from "fresh/runtime"; -import type { RouteConfig } from "fresh"; +import { Partial, type RouteConfig } from "fresh"; export const config: RouteConfig = { skipAppWrapper: true, diff --git a/www/routes/recipes/lemonade.tsx b/www/routes/recipes/lemonade.tsx index c0b4be1f087..8580aeaac5c 100644 --- a/www/routes/recipes/lemonade.tsx +++ b/www/routes/recipes/lemonade.tsx @@ -1,5 +1,4 @@ -import { Partial } from "fresh/runtime"; -import type { RouteConfig } from "fresh"; +import { Partial, type RouteConfig } from "fresh"; export const config: RouteConfig = { skipAppWrapper: true, diff --git a/www/routes/recipes/lemondrop.tsx b/www/routes/recipes/lemondrop.tsx index d223adc4946..dd749046968 100644 --- a/www/routes/recipes/lemondrop.tsx +++ b/www/routes/recipes/lemondrop.tsx @@ -1,5 +1,4 @@ -import { Partial } from "fresh/runtime"; -import type { RouteConfig } from "fresh"; +import { Partial, type RouteConfig } from "fresh"; export const config: RouteConfig = { skipAppWrapper: true, diff --git a/www/routes/showcase-bak.tsx b/www/routes/showcase-bak.tsx index cb920084ec4..3bc03d06c85 100644 --- a/www/routes/showcase-bak.tsx +++ b/www/routes/showcase-bak.tsx @@ -1,5 +1,4 @@ -import { asset } from "fresh/runtime"; -import { page } from "fresh"; +import { asset, page } from "fresh"; import Projects, { type Project } from "../components/Projects.tsx"; import Header from "../components/Header.tsx"; import Footer from "../components/Footer.tsx"; diff --git a/www/routes/showcase.tsx b/www/routes/showcase.tsx index d3313f154cd..75a5dd9250f 100644 --- a/www/routes/showcase.tsx +++ b/www/routes/showcase.tsx @@ -1,5 +1,4 @@ -import { asset } from "fresh/runtime"; -import { page } from "fresh"; +import { asset, page } from "fresh"; import Projects, { type Project } from "../components/Projects.tsx"; import Header from "../components/Header.tsx"; import Footer from "../components/Footer.tsx"; diff --git a/www/utils/markdown.ts b/www/utils/markdown.ts index 0642254d617..d371e394e17 100644 --- a/www/utils/markdown.ts +++ b/www/utils/markdown.ts @@ -1,8 +1,7 @@ export { extractYaml as frontMatter } from "@std/front-matter"; import * as Marked from "marked"; -import { HttpError } from "fresh"; -import { asset } from "fresh/runtime"; +import { asset, HttpError } from "fresh"; import { escape as escapeHtml } from "@std/html"; import { mangle } from "marked-mangle"; import GitHubSlugger from "github-slugger";