From cfac969a129ee65fb72c2812b69c17c7edfda851 Mon Sep 17 00:00:00 2001 From: "Gustavo L de Mello (Guz)" Date: Sun, 13 Oct 2024 20:18:25 -0300 Subject: [PATCH] feat: hello world js test --- assets/js/entry.js | 3 +++ assets/js/hello.js | 7 ++++++- templates/layouts/page.templ | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 assets/js/entry.js diff --git a/assets/js/entry.js b/assets/js/entry.js new file mode 100644 index 0000000..445052e --- /dev/null +++ b/assets/js/entry.js @@ -0,0 +1,3 @@ +import * as hello from './hello.js'; + +hello.hello(); diff --git a/assets/js/hello.js b/assets/js/hello.js index 6b2b3db..66334bb 100644 --- a/assets/js/hello.js +++ b/assets/js/hello.js @@ -1 +1,6 @@ -console.log("hello world"); +/** + * Says hello! + */ +export function hello() { + console.log('hello world'); +} diff --git a/templates/layouts/page.templ b/templates/layouts/page.templ index a4a4bc4..d30aeb4 100644 --- a/templates/layouts/page.templ +++ b/templates/layouts/page.templ @@ -2,7 +2,9 @@ package layouts templ Page() { - + + + { children... }