Skip to content

Commit 8f92af4

Browse files
committed
feat: allow importing runtime exports from core
1 parent c22c20e commit 8f92af4

12 files changed

Lines changed: 18 additions & 22 deletions

File tree

packages/fresh/src/context_test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { expect } from "@std/expect";
22
import { Context } from "./context.ts";
3-
import { App } from "fresh";
4-
import { asset } from "fresh/runtime";
3+
import { App, asset } from "fresh";
54
import { FakeServer } from "./test_utils.ts";
65
import { BUILD_ID } from "@fresh/build-id";
76
import { parseHtml } from "../tests/test_utils.tsx";

packages/fresh/src/mod.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
export {
2+
asset,
3+
assetSrcSet,
4+
IS_BROWSER,
5+
Partial,
6+
type PartialProps,
7+
} from "@fresh/core/runtime";
18
export { App, type ListenOptions } from "./app.ts";
29
export { trailingSlashes } from "./middlewares/trailing_slashes.ts";
310
export {

packages/fresh/tests/active_links_test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { App, staticFiles } from "fresh";
1+
import { App, Partial, staticFiles } from "fresh";
22
import {
33
ALL_ISLAND_DIR,
44
assertNotSelector,
@@ -10,7 +10,6 @@ import {
1010
} from "./test_utils.tsx";
1111

1212
import { FakeServer } from "../src/test_utils.ts";
13-
import { Partial } from "fresh/runtime";
1413

1514
const allIslandCache = await buildProd({ islandDir: ALL_ISLAND_DIR });
1615

packages/fresh/tests/partials_test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { App, staticFiles } from "fresh";
2-
import { Partial } from "fresh/runtime";
1+
import { App, Partial, staticFiles } from "fresh";
32
import {
43
ALL_ISLAND_DIR,
54
assertMetaContent,

www/routes/docs/[...slug].tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { HttpError, page } from "fresh";
2-
import { asset, Partial } from "fresh/runtime";
1+
import { asset, HttpError, page, Partial } from "fresh";
32
import { SidebarCategory } from "../../components/DocsSidebar.tsx";
43
import Footer from "../../components/Footer.tsx";
54
import Header from "../../components/Header.tsx";

www/routes/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { asset } from "fresh/runtime";
2-
import { page } from "fresh";
1+
import { asset, page } from "fresh";
32
import VERSIONS from "../../versions.json" with { type: "json" };
43
import Footer from "../components/Footer.tsx";
54
import Header from "../components/Header.tsx";

www/routes/recipes/lemon-honey-tea.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Partial } from "fresh/runtime";
2-
import type { RouteConfig } from "fresh";
1+
import { Partial, type RouteConfig } from "fresh";
32

43
export const config: RouteConfig = {
54
skipAppWrapper: true,

www/routes/recipes/lemonade.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Partial } from "fresh/runtime";
2-
import type { RouteConfig } from "fresh";
1+
import { Partial, type RouteConfig } from "fresh";
32

43
export const config: RouteConfig = {
54
skipAppWrapper: true,

www/routes/recipes/lemondrop.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { Partial } from "fresh/runtime";
2-
import type { RouteConfig } from "fresh";
1+
import { Partial, type RouteConfig } from "fresh";
32

43
export const config: RouteConfig = {
54
skipAppWrapper: true,

www/routes/showcase-bak.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { asset } from "fresh/runtime";
2-
import { page } from "fresh";
1+
import { asset, page } from "fresh";
32
import Projects, { type Project } from "../components/Projects.tsx";
43
import Header from "../components/Header.tsx";
54
import Footer from "../components/Footer.tsx";

0 commit comments

Comments
 (0)