Inspired by the recent blog series of Lars Lillo Ulvestad on using IHP with Elm, we added a new IHP project template. You can use it by passing the --elm
flag to the ihp-new
command to do the initial project setup needed for elm:
$ ihp-new --elm my-new-elm-project
If you already have used ihp-new before: You likely need to update the ihp-new command before the elm flag is working. Run nix-env -f https://ihp.digitallyinduced.com/ihp-new.tar.gz -i ihp-new
to update it.
This will generate a new IHP project, install elm and wire it up in your Layout.hs
. You'll be greeted with the usual welcome page - but with a small addition Elm is working!
.
You can now start hacking on your elm project. All the elm files are located in the elm
directory. Open elm/Main.elm
and start hacking! :)
There's also a new Elm Guide in the IHP documentation.
To learn more on how to use Elm together with IHP, check out the blog series IHP with Elm.