Files
elm-0.19-workshop/intro/part5
Peter Karth 4035369af2 Updates the dependencies in part5 to 0.19
In attempting the `elm make` call in part received this error:

-- CORRUPT CACHE ---------------------------------------------------------------

I ran into an unknown package while exploring dependencies:

    NoRedInk/json-decode-pipeline

This suggests that your /Users/{UserName}/.elm directory has been corrupted.
Maybe some program is messing with it? It is just cached files, so you can
delete it and see if that fixes the issue.

The names of two of the modules appear to have changed for 0.19. This is
currently updated in the solutions branch but not the exercises branch.

Feel free to delete this if it doesn't fit into your workflow workflow.
It seemed nicest to open this as PR in case anyone else ran into the same
issue and is looking for answers.
2018-08-26 12:45:00 -04:00
..
2018-08-11 18:21:38 -04:00
2018-08-14 03:37:19 -04:00
2018-08-11 18:21:38 -04:00
2018-08-11 18:21:38 -04:00
2018-08-11 18:21:38 -04:00

Part 5

This time, we'll still be building src/Main.elm, but a few things will be different:

  1. We'll be editing a different file. (elm make will figure out it needs to compile our edited file as well, because src/Main.elm imports it!)
  2. We'll open localhost:3000 instead of index.html.
  3. We'll specify a different --output target. (Explained next.)

To build everything, cd into the part5/ directory and run:

elm make src/Main.elm --output ../server/public/elm.js

Then open http://localhost:3000/#/register in your browser. (Opening index.html will not work anymore; from now on we'll be using the server we set up at the beginning of the workshop!)

Exercise

Open src/Page/Register.elm in your editor and resolve the TODO there.

This time we'll be fixing a bug in an existing code base! It's only one TODO, so that you have time to orient yourself in an unfamiliar code base.

Because this is a more real-world code base, it uses some concepts we haven't covered yet. For example, you may be wondering things like "What does Cmd.none do?" This is okay! You won't need to know those concepts to complete the exercise.

You may surprise yourself at how well you can already navigate around an Elm code base, despite not knowing 100% of what the code is doing. As you'll see, the compiler has your back!