No description
Find a file
2014-08-15 19:53:32 +02:00
mario added baseic files 2014-08-15 17:17:47 +02:00
todo added todo example, along with required experimental code 2014-08-15 17:30:52 +02:00
.gitignore ignore cabal and elm generated files 2014-08-15 17:17:28 +02:00
Clock.elm added baseic files 2014-08-15 17:17:47 +02:00
README.md Make easy instructions clearer & hard instructions shorter 2014-08-15 19:53:32 +02:00
setup.sh clearer directions 2014-08-15 19:12:14 +02:00

Elm Examples

A collection of simple Elm projects.

These projects are nice examples of typical Elm code and are fun to play with in Elm Reactor.

Get Set Up

The Easy Way

If you have curl and bash you can get setup by running this script with the following commands. It will set up a directory named elm-starter-kit that has everything you need to get started!

curl https://raw.githubusercontent.com/michaelbjames/elm-examples/master/setup.sh | bash
../elm-reactor/dist/build/elm-reactor/elm-reactor

After that the Reactor should be running at http://localhost:8000. Check it out!

The Hard Way

If you don't want to run a script from the internet or just cannot run it, follow these instructions:

Create a directory to play around in:

mkdir elm-starter-kit
cd elm-starter-kit

Elm Reactor is not available with Elm Platform yet, so for now we need to build from source. First we need to build the latest version of the compiler:

git clone git@github.com:elm-lang/Elm.git
cd elm
cabal sandbox init
cabal install -j
cd ..

Now we can build the Reactor:

git clone git@github.com:elm-lang/elm-reactor.git
cd elm-reactor
cabal sandbox init
cabal sandbox add-source ../elm
cabal install -j
cd ..

Finally we can clone this repo and build the Todo example:

git clone git@github.com:michaelbjames/elm-examples.git
cd elm-examples/todo
elm --make --only-js Todo.elm

And finally we can get started with the examples! Start the reactor from the elm-examples directory:

../elm-reactor/dist/build/elm-reactor/elm-reactor

The Reactor should be running at http://localhost:8000. Check it out!