working template
This commit is contained in:
53
{{cookiecutter.app_name}}/src/Main.elm
Normal file
53
{{cookiecutter.app_name}}/src/Main.elm
Normal file
@@ -0,0 +1,53 @@
|
||||
module Main exposing (..)
|
||||
|
||||
import Browser
|
||||
import Html exposing (Html, h1, text)
|
||||
|
||||
|
||||
|
||||
---- MODEL ----
|
||||
|
||||
|
||||
type alias Model =
|
||||
{}
|
||||
|
||||
|
||||
init : ( Model, Cmd Msg )
|
||||
init =
|
||||
( {}, Cmd.none )
|
||||
|
||||
|
||||
|
||||
---- UPDATE ----
|
||||
|
||||
|
||||
type Msg
|
||||
= NoOp
|
||||
|
||||
|
||||
update : Msg -> Model -> ( Model, Cmd Msg )
|
||||
update msg model =
|
||||
( model, Cmd.none )
|
||||
|
||||
|
||||
|
||||
---- VIEW ----
|
||||
|
||||
|
||||
view : Model -> Html Msg
|
||||
view model =
|
||||
h1 [] [ text "Your Elm app '{{cookiecutter.app_name}}' is working!" ]
|
||||
|
||||
|
||||
|
||||
---- PROGRAM ----
|
||||
|
||||
|
||||
main : Program () Model Msg
|
||||
main =
|
||||
Browser.element
|
||||
{ view = view
|
||||
, init = \_ -> init
|
||||
, update = update
|
||||
, subscriptions = always Sub.none
|
||||
}
|
Reference in New Issue
Block a user