https://github.com/stil4m/techday-elm
Techday for Avisi on the programming language Elm
https://github.com/stil4m/techday-elm
Last synced: 2 months ago
JSON representation
Techday for Avisi on the programming language Elm
- Host: GitHub
- URL: https://github.com/stil4m/techday-elm
- Owner: stil4m
- Created: 2015-12-26T11:35:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-09T22:18:45.000Z (almost 9 years ago)
- Last Synced: 2025-01-21T18:51:38.320Z (4 months ago)
- Language: HTML
- Size: 7.37 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Resources
* Performance: thehttp://elm-lang.org/blog/blazing-fast-html
# Important
* This means no one can rely on implementation details that were not made public (https://github.com/evancz/elm-architecture-tutorial/)
# First Program
### SetupFile in `src/Index.elm`
```
import Html exposing (div, button, text)
import Html.Events exposing (onClick)
import StartApp.Simple as StartAppmain =
StartApp.start { model = model, view = view, update = update }model = 0
view address model =
div []
[ button [ onClick address Decrement ] [ text "-" ]
, button [ onClick address Increment ] [ text "+" ]
, div [] [ text (toString model) ]
]type Action = Increment | Decrement
update action model =
case action of
Increment -> model + 1
Decrement -> model - 1
```---
### Run
`elm package install`
Installs the required package elm-core.
```
elm package install evancz/elm-html
elm package install evancz/start-app
```Install dependencies
`elm-reactor`
Starts a webserver and compiles elm on the fly