Update example 1 to 0.19

This commit is contained in:
mike stedman 2018-12-09 14:29:34 -07:00
parent 2d1117eac2
commit 78dc0461d7
5 changed files with 5750 additions and 25 deletions

View File

@ -1,20 +1,18 @@
import Browser exposing (element)
import Html exposing (Html, div, h1, input, text) import Html exposing (Html, div, h1, input, text)
import Html.Attributes exposing (placeholder) import Html.Attributes exposing (placeholder)
import Html.Events exposing (onInput) import Html.Events exposing (onInput)
import Table import Table
main = main =
Html.program Browser.element
{ init = init presidents { init = (init presidents)
, update = update , update = update
, view = view , view = view
, subscriptions = \_ -> Sub.none , subscriptions = \_ -> Sub.none
} }
-- MODEL -- MODEL
@ -24,9 +22,10 @@ type alias Model =
, query : String , query : String
} }
type alias Flags = {}
init : List Person -> ( Model, Cmd Msg ) init : (List Person) -> Flags -> ( Model, Cmd Msg )
init people = init people flags =
let let
model = model =
{ people = people { people = people

View File

@ -1,16 +0,0 @@
{
"version": "1.0.1",
"summary": "helpful summary of your project, less than 80 characters",
"repository": "https://github.com/user/project.git",
"license": "BSD3",
"source-directories": [
"."
],
"exposed-modules": [],
"dependencies": {
"elm-lang/core": "5.0.0 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0",
"evancz/elm-sortable-table": "1.0.1 <= v < 2.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}

5712
examples/elm.js Normal file

File diff suppressed because it is too large Load Diff

25
examples/elm.json Normal file
View File

@ -0,0 +1,25 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.0",
"dependencies": {
"direct": {
"NoRedInk/elm-sortable-table": "1.0.0",
"elm/browser": "1.0.1",
"elm/core": "1.0.2",
"elm/html": "1.0.0"
},
"indirect": {
"elm/json": "1.1.2",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2"
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}

View File

@ -9,7 +9,12 @@
</head> </head>
<body> <body>
<script type="text/javascript">Elm.Main.fullscreen();</script> <div id="elm-mount"></div>
<script type="text/javascript">
Elm.Main.init({
node: document.getElementById('elm-mount')
});
</script>
</body> </body>
</html> </html>