j-hannes / structured-elm-todomvc

Structured TodoMVC with Elm to exemplify real-world apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Structured TodoMVC in Elm

Deploy

This is based on the official TodoMVC Elm example, but instead of putting all the code in one file, this project has the goal to exemplify how you would break that file in different modules to create your app structure, always following The Elm Architecture.

Project Structure

We have four main folders: Action, Model, Update and View.

Each one of those folders have a Main.elm file, which combines all other modules, e.g. the Update.Main is a combination of all other Updates in the project, the Model.Main is a combination of all other models in the project, and so on.

Finally, the root main file, called Todo.elm, uses the Main Update, the Main Model and the Main View to start your app.

Checkout the modularized alternative too

Build Instructions

Run the following command from the root of this project:

elm-make Todo.elm --output elm.js

Then open index.html in your browser!

About

Structured TodoMVC with Elm to exemplify real-world apps

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Elm 54.7%Language:CSS 41.9%Language:HTML 3.4%