Order form toy project for a perfectly normal pet shop.
You can see the finished project that we will be building here: DEMO
- Click here to view live presentation
- If the workshop has ended, you can review the slides here
A src/complete
directory and a src/kit
directory.
- In the
complete
folder you will find the source code for the finished project. - In the
kit
folder you will find the exercise files for this workshop.
We will be working together to implement the logic in the complete
folder using the exercise files found in the kit
folder.
PLEASE DO NOT go right off and read the source code for the completed project. The code in complete
is intended to serve as a resource in case you get stuck, or want to compare after the fact, not as a cheat sheet.
(if you have docker on a linux host skip to the end)
First, you are going to need Elm installed locally. You can get the installer from elm-lang.org, or below (mirrored):
- Mac -- installer
- Windows -- installer
- Anywhere -- npm installer (below), build from source
Or just use npm
npm install -g elm@0.17.0
You can use any editor you like, however there is reasonably good Elm support for the following editors:
- Atom
apm install language-elm linter linter-elm-make
- Emacs
- Vim
- Lightable
- Sublime Text
- Visual Studio Code
git clone https://github.com/Fresheyeball/lambdaconf-2016-elm-workshop.git
cd lambdaconf-2016-elm-workshop
elm reactor
Elm comes with a server and compilation assistant called Reactor. After running elm reactor
you should be able to visit localhost:8000/src/kit/Main.elm in your browser to see the output of your code.
We will be working with the latest version of the Elm compiler 0.17.x, which came out this month. If you have issues or run into weirdness, usually rm -rf elm-stuff
will clear it up.
If you have docker on a Linux host, there is a prepped image to run this project. Running this script will launch the Atom editor with Elm packages installed and a browser window with the Reactor. If the browser window fails to open just visit localhost:8000/src/kit/Main.elm
./docker-dev.sh
When you are done it's recommended you run xhost -
as this script opens up xorg to serve atom from inside the container.