feat: improved elm template

This commit is contained in:
Nick 2025-06-21 14:20:54 -05:00
parent 8545d7c1e8
commit 6b2a601776
22 changed files with 2139 additions and 0 deletions

View file

@ -0,0 +1,25 @@
// This returns the flags passed into your Elm application
export const flags = async ({ env } : ElmLand.FlagsArgs) => {
return {}
}
// This function is called after your Elm app starts
export const onReady = ({ app, env } : ElmLand.OnReadyArgs) => {
console.log('Elm is ready', app)
}
// Type definitions for Elm Land
namespace ElmLand {
export type FlagsArgs = {
env: Record<string, string>
}
export type OnReadyArgs = {
env: Record<string, string>
app: { ports?: Record<string, Port> }
}
export type Port = {
send?: (data: unknown) => void
subscribe?: (callback: (data: unknown) => unknown) => void
}
}