Start renaming

This commit is contained in:
2026-11-11 11:45:20 -03:00
parent ae22ec5276
commit 216d54a0ae
179 changed files with 890 additions and 449 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import { SideBySide } from "../../components/SideBySide.tsx";
import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
import { FancyLink } from "../../components/FancyLink.tsx";
const apiCode = `import { createDefine } from "fresh";
const apiCode = `import { createDefine } from "sweet";
const define = createDefine();
export const handlers = define.handlers({
+1 -1
View File
@@ -8,7 +8,7 @@ import { ExampleArrow } from "../homepage/ExampleArrow.tsx";
import { FancyLink } from "../FancyLink.tsx";
import { FormSubmitDemo } from "../../islands/FormSubmitDemo.tsx";
const routingCode = `import { createDefine } from "fresh";
const routingCode = `import { createDefine } from "sweet";
const define = createDefine();
export const handler = define.handlers({
+1 -1
View File
@@ -5,7 +5,7 @@ import { SideBySide } from "../../components/SideBySide.tsx";
import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
import { FancyLink } from "../../components/FancyLink.tsx";
const headCode = `import { Head } from "fresh/runtime";
const headCode = `import { Head } from "sweet/runtime";
export default function MyPage() {
return (
+1 -1
View File
@@ -19,7 +19,7 @@ export function Hero() {
</p>
<div class="mt-12 flex flex-wrap justify-center items-stretch md:justify-start gap-4">
<FancyLink href="/docs/getting-started">Get started</FancyLink>
<CopyArea code={`deno run -Ar jsr:@fresh/init`} />
<CopyArea code={`deno run -Ar jsr:@paulaboks/sweet-init`} />
</div>
</div>
<div class="md:col-span-2 flex justify-center items-end pb-8 md:pb-32">
+1 -1
View File
@@ -8,7 +8,7 @@ import { ExampleArrow } from "../../components/homepage/ExampleArrow.tsx";
import { RecipeDemo } from "../../components/homepage/RecipeDemo.tsx";
import { FancyLink } from "../../components/FancyLink.tsx";
const islandCode = `import { Partial } from "fresh/runtime";
const islandCode = `import { Partial } from "sweet/runtime";
export const Recipes = () => (
<div f-client-nav>
+1 -1
View File
@@ -1,4 +1,4 @@
import { Partial } from "fresh/runtime";
import { Partial } from "sweet/runtime";
export const RecipeDemo = () => (
<div
+1 -1
View File
@@ -5,7 +5,7 @@ import { SideBySide } from "../../components/SideBySide.tsx";
import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
import { FancyLink } from "../../components/FancyLink.tsx";
const otelCode = `import { App } from "fresh";
const otelCode = `import { App } from "sweet";
// When OpenTelemetry is active, Fresh
// auto-injects a <meta name="traceparent">
+1 -1
View File
@@ -21,7 +21,7 @@ export async function GET() {
}`;
const FRESH_EXAMPLE = `// main.ts — that's it.
import { App } from "fresh";
import { App } from "sweet";
const app = new App()
.get("/", (ctx) =>
@@ -5,7 +5,7 @@ import { SideBySide } from "../../components/SideBySide.tsx";
import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
import { FancyLink } from "../../components/FancyLink.tsx";
const transitionCode = `import { App } from "fresh";
const transitionCode = `import { App } from "sweet";
const app = new App({
// Enable the View Transitions API
+1 -1
View File
@@ -5,7 +5,7 @@ import { SideBySide } from "../../components/SideBySide.tsx";
import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
import { FancyLink } from "../../components/FancyLink.tsx";
const wsCode = `import { App } from "fresh";
const wsCode = `import { App } from "sweet";
const app = new App();
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env -S deno run -A --watch=static/,routes/
import { Builder } from "fresh/dev";
import { tailwind } from "@fresh/plugin-tailwind";
import { Builder } from "sweet/dev";
import { tailwind } from "@paulaboks/sweet-tailwind";
const builder = new Builder({ target: "safari12" });
tailwind(builder);
+1 -1
View File
@@ -1,4 +1,4 @@
import { IS_BROWSER } from "fresh/runtime";
import { IS_BROWSER } from "sweet/runtime";
import { useSignal } from "@preact/signals";
export default function ThemeToggle() {
+1 -1
View File
@@ -1,6 +1,6 @@
// Copyright 2022-2023 the Deno authors. All rights reserved. MIT license.
import { IS_BROWSER } from "fresh/runtime";
import { IS_BROWSER } from "sweet/runtime";
import type { VersionLink } from "../routes/docs/[...slug].tsx";
export default function VersionSelect(
+1 -1
View File
@@ -1,4 +1,4 @@
import { App, staticFiles, trailingSlashes } from "fresh";
import { App, staticFiles, trailingSlashes } from "sweet";
export const app = new App()
.use(async (ctx) => {
+1 -1
View File
@@ -1,4 +1,4 @@
import { asset } from "fresh/runtime";
import { asset } from "sweet/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";
import { HttpError, type PageProps } from "sweet";
import LemonDrop from "../islands/LemonDrop.tsx";
export function ServerCodePage(
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Context } from "fresh";
import type { Context } from "sweet";
import type { Event } from "../utils/ga4.ts";
import { GA4Report, isDocument, isServerError } from "../utils/ga4.ts";
+2 -2
View File
@@ -1,5 +1,5 @@
import { HttpError, page } from "fresh";
import { asset, Partial } from "fresh/runtime";
import { HttpError, page } from "sweet";
import { asset, Partial } from "sweet/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 { PageProps } from "@fresh/core";
import type { PageProps } from "@paulaboks/sweet";
export default function Layout({ Component }: PageProps) {
return (
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Context } from "fresh";
import type { Context } from "sweet";
const REDIRECTS: Record<string, string> = {
"/docs/getting-started/fetching-data":
+2 -2
View File
@@ -1,5 +1,5 @@
import { asset } from "fresh/runtime";
import { page } from "fresh";
import { asset } from "sweet/runtime";
import { page } from "sweet";
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";
import type { RouteConfig } from "sweet";
import { format, parse } from "@std/semver";
import VERSIONS from "../../versions.json" with { type: "json" };
import { extname } from "@std/path";
+1 -1
View File
@@ -1,4 +1,4 @@
import type { PageProps } from "fresh";
import type { PageProps } from "sweet";
import Header from "../../components/Header.tsx";
export default function Layout({ Component }: PageProps) {
+2 -2
View File
@@ -1,5 +1,5 @@
import { page } from "fresh";
import { Partial } from "fresh/runtime";
import { page } from "sweet";
import { Partial } from "sweet/runtime";
import { define } from "../../utils/state.ts";
export const handler = define.handlers({
+2 -2
View File
@@ -1,5 +1,5 @@
import { page } from "fresh";
import { Partial } from "fresh/runtime";
import { page } from "sweet";
import { Partial } from "sweet/runtime";
import { define } from "../../utils/state.ts";
export const handler = define.handlers({
+2 -2
View File
@@ -1,5 +1,5 @@
import { page } from "fresh";
import { Partial } from "fresh/runtime";
import { page } from "sweet";
import { Partial } from "sweet/runtime";
import { define } from "../../utils/state.ts";
export const handler = define.handlers({
+1 -1
View File
@@ -1,4 +1,4 @@
import { page } from "fresh";
import { page } from "sweet";
import { PageSection } from "../components/PageSection.tsx";
import { DemoBox } from "../components/homepage/DemoBox.tsx";
import { define } from "../utils/state.ts";
+2 -2
View File
@@ -1,8 +1,8 @@
export { extractYaml as frontMatter } from "@std/front-matter";
import * as Marked from "marked";
import { HttpError } from "fresh";
import { asset } from "fresh/runtime";
import { HttpError } from "sweet";
import { asset } from "sweet/runtime";
import { escape as escapeHtml } from "@std/html";
import { mangle } from "marked-mangle";
import GitHubSlugger from "github-slugger";
+1 -1
View File
@@ -1,4 +1,4 @@
import { createDefine } from "fresh";
import { createDefine } from "sweet";
export interface State {
title?: string;
+1 -1
View File
@@ -1,5 +1,5 @@
import { defineConfig, type Plugin } from "vite";
import { fresh } from "@fresh/plugin-vite";
import { fresh } from "@paulaboks/sweet-vite";
import tailwindcss from "@tailwindcss/vite";
import inspect from "vite-plugin-inspect";
import { copy } from "@std/fs";