From f67d8564ba6188df84a206602c91ccf90dc98118 Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar" <19791+drernie@users.noreply.github.com> Date: Mon, 17 Feb 2025 15:58:22 -0800 Subject: [PATCH 01/11] outdated --- deno.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deno.json b/deno.json index 4e2e8dc..6c4ac2e 100644 --- a/deno.json +++ b/deno.json @@ -29,9 +29,9 @@ "preact/": "https://esm.sh/preact@10.22.0/", "@preact/signals": "https://esm.sh/*@preact/signals@1.2.2", "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1", - "tailwindcss": "npm:tailwindcss@3.4.17", - "tailwindcss/": "npm:/tailwindcss@3.4.17/", - "tailwindcss/plugin": "npm:/tailwindcss@3.4.17/plugin.js", + "tailwindcss": "npm:tailwindcss@4.0.6", + "tailwindcss/": "npm:/tailwindcss@4.0.6/", + "tailwindcss/plugin": "npm:/tailwindcss@4.0.6/plugin.js", "$std/": "https://deno.land/std@0.216.0/" }, "compilerOptions": { From a63242333be26b150ddf9cfdea389586b9a5fa0d Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar" <19791+drernie@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:00:29 -0800 Subject: [PATCH 02/11] import latest hclang --- deno.json | 2 +- tests/hclang.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deno.json b/deno.json index 6c4ac2e..77b9b0a 100644 --- a/deno.json +++ b/deno.json @@ -24,7 +24,7 @@ ], "imports": { "$fresh/": "https://deno.land/x/fresh@1.7.3/", - "@swanfactory/hclang": "jsr:@swanfactory/hclang@^0.6.7", + "@swanfactory/hclang": "jsr:@swanfactory/hclang@^0.6.9", "preact": "https://esm.sh/preact@10.22.0", "preact/": "https://esm.sh/preact@10.22.0/", "@preact/signals": "https://esm.sh/*@preact/signals@1.2.2", diff --git a/tests/hclang.test.ts b/tests/hclang.test.ts index 8610634..e8257b9 100644 --- a/tests/hclang.test.ts +++ b/tests/hclang.test.ts @@ -6,6 +6,6 @@ import { expect } from "jsr:@std/expect"; describe('evaluate', () => { it('should evaluate a simple expression', () => { const result = execute('2 + 2'); - expect(result).toBe(4); + expect(result).toBe("4"); }); }); \ No newline at end of file From 75369c62d4c9758cc104da3d8ab8769a65cb7533 Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar (aider)" <19791+drernie@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:01:43 -0800 Subject: [PATCH 03/11] fix: Update Tailwind CSS configuration to use @tailwindcss/postcss plugin --- tailwind.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tailwind.config.ts b/tailwind.config.ts index 3bf438c..f67f2c8 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -4,4 +4,7 @@ export default { content: [ "{routes,islands,components}/**/*.{ts,tsx,js,jsx}", ], + plugins: [ + require('@tailwindcss/postcss') + ] } satisfies Config; From e759f807c11b5c80e8d0fea3c35f967e6b9aa91e Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar (aider)" <19791+drernie@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:02:25 -0800 Subject: [PATCH 04/11] feat: Convert Tailwind config to ESM syntax --- tailwind.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tailwind.config.ts b/tailwind.config.ts index f67f2c8..7615d91 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,10 +1,11 @@ import type { Config } from "tailwindcss"; +import postcss from "@tailwindcss/postcss"; export default { content: [ "{routes,islands,components}/**/*.{ts,tsx,js,jsx}", ], plugins: [ - require('@tailwindcss/postcss') + postcss ] } satisfies Config; From 5a55b14a6fd0ba4a8362712d72d333af153051e8 Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar (aider)" <19791+drernie@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:06:24 -0800 Subject: [PATCH 05/11] refactor: Switch from Tailwind to UnoCSS with configuration updates --- fresh.config.ts | 4 ++-- tailwind.config.ts | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/fresh.config.ts b/fresh.config.ts index 6f7acca..4255ce0 100644 --- a/fresh.config.ts +++ b/fresh.config.ts @@ -1,8 +1,8 @@ import { defineConfig } from "$fresh/server.ts"; -import tailwind from "$fresh/plugins/tailwind.ts"; +import unocss from "@unocss/fresh"; export default defineConfig({ plugins: [ - tailwind(), + unocss(), ], }); diff --git a/tailwind.config.ts b/tailwind.config.ts index 7615d91..dd5abff 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,11 +1,14 @@ -import type { Config } from "tailwindcss"; -import postcss from "@tailwindcss/postcss"; +import { defineConfig } from '@unocss/core'; +import presetUno from '@unocss/preset-uno'; +import presetWind from '@unocss/preset-wind'; -export default { - content: [ - "{routes,islands,components}/**/*.{ts,tsx,js,jsx}", +export default defineConfig({ + presets: [ + presetUno(), + presetWind(), ], - plugins: [ - postcss - ] -} satisfies Config; + include: [/\.(ts|tsx|js|jsx)$/], + theme: { + // Your theme customizations here + }, +}); From 09d793c4edd7c43be8340e29f03d1cb89f870813 Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar" <19791+drernie@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:15:43 -0800 Subject: [PATCH 06/11] no plugins --- deno.json | 3 --- fresh.config.ts | 2 -- static/styles.css | 3 --- tailwind.config.ts | 14 -------------- 4 files changed, 22 deletions(-) delete mode 100644 static/styles.css delete mode 100644 tailwind.config.ts diff --git a/deno.json b/deno.json index 77b9b0a..e830849 100644 --- a/deno.json +++ b/deno.json @@ -29,9 +29,6 @@ "preact/": "https://esm.sh/preact@10.22.0/", "@preact/signals": "https://esm.sh/*@preact/signals@1.2.2", "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1", - "tailwindcss": "npm:tailwindcss@4.0.6", - "tailwindcss/": "npm:/tailwindcss@4.0.6/", - "tailwindcss/plugin": "npm:/tailwindcss@4.0.6/plugin.js", "$std/": "https://deno.land/std@0.216.0/" }, "compilerOptions": { diff --git a/fresh.config.ts b/fresh.config.ts index 4255ce0..aaefd3d 100644 --- a/fresh.config.ts +++ b/fresh.config.ts @@ -1,8 +1,6 @@ import { defineConfig } from "$fresh/server.ts"; -import unocss from "@unocss/fresh"; export default defineConfig({ plugins: [ - unocss(), ], }); diff --git a/static/styles.css b/static/styles.css deleted file mode 100644 index b5c61c9..0000000 --- a/static/styles.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; diff --git a/tailwind.config.ts b/tailwind.config.ts deleted file mode 100644 index dd5abff..0000000 --- a/tailwind.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from '@unocss/core'; -import presetUno from '@unocss/preset-uno'; -import presetWind from '@unocss/preset-wind'; - -export default defineConfig({ - presets: [ - presetUno(), - presetWind(), - ], - include: [/\.(ts|tsx|js|jsx)$/], - theme: { - // Your theme customizations here - }, -}); From 932b6d14cd08c9d7852d8335955369bcd5a1be6e Mon Sep 17 00:00:00 2001 From: "Dr. Ernie Prabhakar" <19791+drernie@users.noreply.github.com> Date: Mon, 17 Feb 2025 16:33:43 -0800 Subject: [PATCH 07/11] use bare w3c styles --- islands/Interpreter.tsx | 25 +++++++++++++++--------- routes/_app.tsx | 24 ++++++++++++++++------- routes/index.tsx | 43 ++++++++++++++--------------------------- 3 files changed, 47 insertions(+), 45 deletions(-) diff --git a/islands/Interpreter.tsx b/islands/Interpreter.tsx index c16e85f..6f7c98c 100644 --- a/islands/Interpreter.tsx +++ b/islands/Interpreter.tsx @@ -30,26 +30,33 @@ export default function Interpreter() { }; return ( -