From eacea42c12f8f7c8e8e41d7160aa063873a52cba Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Wed, 12 Apr 2023 09:47:57 +0300 Subject: [PATCH] chore: add tailwind and vscode config --- .gitignore | 1 + .vscode/settings.json | 5 +++++ components/Button.tsx | 1 + deno.lock | 10 ++++++++++ flake.nix | 6 +++++- import_map.json | 4 +++- islands/Counter.tsx | 4 ++-- main.ts | 5 ++++- routes/index.tsx | 10 ++++------ twind.config.ts | 5 +++++ 10 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 twind.config.ts diff --git a/.gitignore b/.gitignore index 7ad6275..6c7f6d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /.direnv +/.helix \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f4f84f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "deno.enable": true, + "deno.lint": true, + "editor.defaultFormatter": "denoland.vscode-deno" +} diff --git a/components/Button.tsx b/components/Button.tsx index 0d10b4b..909d380 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -6,6 +6,7 @@ export function Button(props: JSX.HTMLAttributes) { diff --git a/main.ts b/main.ts index dedce9c..bb00964 100644 --- a/main.ts +++ b/main.ts @@ -7,4 +7,7 @@ import { start } from "$fresh/server.ts"; import manifest from "./fresh.gen.ts"; -await start(manifest); +import twindPlugin from "$fresh/plugins/twind.ts"; +import twindConfig from "./twind.config.ts"; + +await start(manifest, { plugins: [twindPlugin(twindConfig)] }); diff --git a/routes/index.tsx b/routes/index.tsx index f054f50..5687d54 100644 --- a/routes/index.tsx +++ b/routes/index.tsx @@ -7,19 +7,17 @@ export default function Home() { Fresh App -
+
the fresh logo: a sliced lemon dripping with juice -

+

Welcome to `fresh`. Try updating this message in the ./routes/index.tsx file, and refresh. - Hiiiiiii

- +
); diff --git a/twind.config.ts b/twind.config.ts new file mode 100644 index 0000000..2a7ac27 --- /dev/null +++ b/twind.config.ts @@ -0,0 +1,5 @@ +import { Options } from "$fresh/plugins/twind.ts"; + +export default { + selfURL: import.meta.url, +} as Options;