Elm, besides being an awesome language with a nice ecosystem of packages, also has an incredible ecosystem of tools. In this post, I list a few of my favourite ones and quite shamelessly plug a few of my own.
npm i elm-format
One of the best known tools in the Elm ecosystem, this one needs no introduction.
A quick overview:
- zero-config formatting of all your Elm code
- integrations with popular editors
- can be used in CI using the
npm i elm-test
elm-test is your one-stop shop for testing Elm code. Useful for plain old unit tests, property-based tests using fuzz tests, as well as inspecting generated HTML using
Test.Html.Query in combination with some selectors, it enables some really powerful testing scenario's.
The de-facto way of using
elm-test is through the node-based test-runner.
Noteworthy: it's supported on travis, too!
npm i elm-verify-examples
Incredibly useful when writing documentation for your packages,
elm-verify-examples allows running your examples and verifying their correctness.
If you're publishing packages, this should be part of your CI setup!
npm i elm-doc-preview
Writing documentation for a package is so much easier when there is a nice way to preview what it will actually look like. And that's where
elm-doc-preview comes in!
elm-doc-preview can be used locally, but also exists as a hosted version that can preview docs for GitHub repositories, as long as a
docs.json are committed.
npm i elm-doc
Along the same lines, but geared towards writing applications,
elm-doc allows viewing the docs of all of your dependencies in one single location, fully offline.
Disclaimer: I made this
npm i elm-analyse
elm-analyse analyses your Elm code and can help identify a bunch of (potential) issues, while also allowing quick-fixes for a bunch of best practices. Very cool tool!
npm i elm-xref
Inspired by Erlang/OTP's http://erlang.org/doc/apps/tools/xref_chapter.html,
elm-xref is a cross-referencing tool.
This essentially means that it can do static analysis of your codebase and identify unused functions (both private and exposed), or look for all the places a given function is used.
Disclaimer: I also made this
An online tool that analyses your elm.json, and can tell you which of your dependencies have updates available, shows your potential incompatibilities between the available versions of your dependencies, and so on.
If you've ever wondered why you can't update
elm/http, this tool can tell you why!
If you're using GraphQL with Elm (or want to use GraphQL with Elm), this package/tool combination allows generating a type-safe interface to your GraphQL backend based on the schema.
Great docs, very well thought-out API, and overall an absolute joy to work with!
Did I miss any of the tools you love to use? Feel free to point out in comments!