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