Although these are awesome projects that can help you get productive very quickly, they suffer from the same drawbacks: They come with a bunch of tools that you may not need at the beginning and especially when you are just learning Elm.

Webpack, Service Worker, Live reloading, Server Side Rendering etc…. These are great tools that come out of the box with such boilerplates, but they add some complexity

Just say Yo !

Then I remembered this project I heard about those days, when I was doing some angular JS: Yeoman

Yeoman helps you to kickstart new projects, prescribing best practices and tools to help you stay productive.

To do so, we provide a generator ecosystem. A generator is basically a plugin that can be run with the ‘yo’ command to scaffold complete projects or useful parts.

(Official Yeoman Documentation)

This is exactly what we need. Just say ‘yo’ and it generates an Elm app for you.

Here comes Elm Starter Kit Generator

So i created a simple Yeoman Generator called Elm-starter-kit.The goal of this command is to help you create and bootstrap a minimalist Elm Application. No webpack, no modules, just a single Main.elm file with a minimal amount of code to run your application.

Just to be clear, it’s not meant to replace boilerplates, but it can be used at first before moving to them once your project becomes more complex.

Let me show you how it works:

Just open a new folder and run the following commands

npm i -g yo && npm i -g generator-elm-starter-kit;

yo elm-starter-kit;

Enter the name of your project;

Select the type of the application (sandbox, application etc….)

After the installation is complete, your app is running on htttp://localhost:8000.

Starting your project like this comes with the following advantages:

No need to copy and paste some code manually. It’s fast and direct.

The code fits in a single Main.elm file. It’s a known best practice to start your application small and add modules only when you app starts to be big and hard to reason about (see the Life of a File by Evan Czaplicki)

Conclusion

I find that sometimes it’s very difficult for people learning a new language to find good examples to get started. Elm maintainers did a great job with the documentation, Elm Guide etc…. But still, people want to get productive very quickly.

Boilerplates are great for that, but they can come with a high cost in complexity.

In this article we have seen that Elm Starter kit is just another tool that can be added to your toolbox if you want to start your Elm journey in a fast and simple way.