feat: some shit

This commit is contained in:
max_richter 2023-07-27 15:28:50 +02:00
parent 07b5e44f22
commit 866a521508
10 changed files with 36 additions and 31 deletions

View File

@ -21,7 +21,13 @@
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.2.3",
"twind": "https://esm.sh/twind@0.16.19",
"twind/": "https://esm.sh/twind@0.16.19/",
"$std/": "https://deno.land/std@0.193.0/"
"$std/": "https://deno.land/std@0.193.0/",
"@lib": "./lib",
"@lib/": "./lib/",
"@components": "./components",
"@components/": "./components/",
"@islands": "./islands",
"@islands/": "./islands/"
},
"compilerOptions": {
"jsx": "react-jsx",

View File

@ -4,26 +4,26 @@
import * as $0 from "./routes/_404.tsx";
import * as $1 from "./routes/_app.tsx";
import * as $2 from "./routes/api/index.ts";
import * as $3 from "./routes/api/recipes/[name].ts";
import * as $4 from "./routes/api/recipes/images/[image].ts";
import * as $5 from "./routes/api/recipes/index.ts";
import * as $6 from "./routes/index.tsx";
import * as $7 from "./routes/recipes/[name].tsx";
import * as $8 from "./routes/recipes/index.tsx";
import * as $2 from "./routes/resources/api/index.ts";
import * as $3 from "./routes/resources/api/recipes/[name].ts";
import * as $4 from "./routes/resources/api/recipes/images/[image].ts";
import * as $5 from "./routes/resources/api/recipes/index.ts";
import * as $6 from "./routes/resources/index.tsx";
import * as $7 from "./routes/resources/recipes/[name].tsx";
import * as $8 from "./routes/resources/recipes/index.tsx";
import * as $$0 from "./islands/Counter.tsx";
const manifest = {
routes: {
"./routes/_404.tsx": $0,
"./routes/_app.tsx": $1,
"./routes/api/index.ts": $2,
"./routes/api/recipes/[name].ts": $3,
"./routes/api/recipes/images/[image].ts": $4,
"./routes/api/recipes/index.ts": $5,
"./routes/index.tsx": $6,
"./routes/recipes/[name].tsx": $7,
"./routes/recipes/index.tsx": $8,
"./routes/resources/api/index.ts": $2,
"./routes/resources/api/recipes/[name].ts": $3,
"./routes/resources/api/recipes/images/[image].ts": $4,
"./routes/resources/api/recipes/index.ts": $5,
"./routes/resources/index.tsx": $6,
"./routes/resources/recipes/[name].tsx": $7,
"./routes/resources/recipes/index.tsx": $8,
},
islands: {
"./islands/Counter.tsx": $$0,

View File

@ -13,5 +13,4 @@ import twindPlugin from "$fresh/plugins/twind.ts";
import twindConfig from "./twind.config.ts";
await start(manifest, {
plugins: [twindPlugin(twindConfig)],
staticDir: "/resources",
});

View File

@ -1,5 +1,5 @@
import { HandlerContext } from "$fresh/server.ts";
import { getDocuments } from "../../lib/documents.ts";
import { getDocuments } from "@lib/documents.ts";
export const handler = async (
_req: Request,

View File

@ -1,6 +1,6 @@
import { HandlerContext } from "$fresh/server.ts";
import { getDocument } from "../../../lib/documents.ts";
import { parseRecipe } from "../../../lib/recipes.ts";
import { getDocument } from "@lib/documents.ts";
import { parseRecipe } from "@lib/recipes.ts";
export async function getRecipe(name: string) {
const document = await getDocument(`Recipes/${name}.md`);

View File

@ -5,7 +5,7 @@ import {
MagickGeometry,
} from "https://deno.land/x/imagemagick_deno@0.0.14/mod.ts";
import { parseMediaType } from "https://deno.land/std@0.175.0/media_types/parse_media_type.ts";
import * as cache from "../../../../lib/cache.ts";
import * as cache from "@lib/cache.ts";
await initializeImageMagick();

View File

@ -1,6 +1,6 @@
import { HandlerContext } from "$fresh/server.ts";
import { getDocument, getDocuments } from "../../../lib/documents.ts";
import { parseRecipe } from "../../../lib/recipes.ts";
import { getDocument, getDocuments } from "@lib/documents.ts";
import { parseRecipe } from "@lib/recipes.ts";
export async function getRecipes() {
const documents = await getDocuments();

View File

@ -1,6 +1,6 @@
import { Head } from "$fresh/runtime.ts";
import { useSignal } from "@preact/signals";
import Counter from "../islands/Counter.tsx";
import Counter from "@islands/Counter.tsx";
export default function Home() {
const count = useSignal(3);

View File

@ -1,8 +1,8 @@
import { Handlers, PageProps } from "$fresh/server.ts";
import { IngredientsList } from "../../components/IngredientsList.tsx";
import { RecipeHero } from "../../components/RecipeHero.tsx";
import { MainLayout } from "../../components/layouts/main.tsx";
import { Recipe } from "../../lib/recipes.ts";
import { IngredientsList } from "@components/IngredientsList.tsx";
import { RecipeHero } from "@components/RecipeHero.tsx";
import { MainLayout } from "@components/layouts/main.tsx";
import { Recipe } from "@lib/recipes.ts";
import { getRecipe } from "../api/recipes/[name].ts";
export const handler: Handlers<Recipe | null> = {

View File

@ -1,8 +1,8 @@
import { Handlers, PageProps } from "$fresh/server.ts";
import { RecipeCard } from "../../components/RecipeCard.tsx";
import { MainLayout } from "../../components/layouts/main.tsx";
import type { Document } from "../../lib/documents.ts";
import { Recipe } from "../../lib/recipes.ts";
import { RecipeCard } from "@components/RecipeCard.tsx";
import { MainLayout } from "@components/layouts/main.tsx";
import type { Document } from "@lib/documents.ts";
import { Recipe } from "@lib/recipes.ts";
import { getRecipes } from "../api/recipes/index.ts";
export const handler: Handlers<Recipe[] | null> = {