Move static outside HTML. Start work on TypeScript bundle
It's not strictly HTML, so that's just correct. This is just worth doing while building the new TypeScript bundle
This commit is contained in:
parent
976a29b7d7
commit
31947c848a
53 changed files with 7100 additions and 73 deletions
10
ts/main.ts
10
ts/main.ts
|
|
@ -1,5 +1,12 @@
|
|||
import Alpine from './vendor/alpinejs-3.15.8.js';
|
||||
|
||||
// Make Alpine available on window for inline Alpine
|
||||
window.Alpine = Alpine;
|
||||
|
||||
// Wait for DOM to be ready, then initialize Alpine
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
Alpine.start();
|
||||
});
|
||||
interface GreetingComponent {
|
||||
message: string;
|
||||
name: string;
|
||||
|
|
@ -14,6 +21,3 @@ Alpine.data('greeting', (): GreetingComponent => ({
|
|||
this.message = 'Message updated at ' + new Date().toLocaleTimeString();
|
||||
}
|
||||
}));
|
||||
|
||||
Alpine.start();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue