This week: Elm tools - a guest post by Ilias Van Peer
Issue #49
A roundup of what's happening in the wonderful world of Elm
Elm tools (a guest post by Ilias Van Peer)
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.
Install with: 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 --validate flag
Install with: 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 scenarios.

The de-facto way of using elm-test is through the Node-based test runner.

Noteworthy: it's supported on Travis, too!
Install with: 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!
Install with: 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 README.md and docs.json are committed.
Install with: 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.
Install with: 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!
Install with: 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!
Install with:
elm install dillonkearns/elm-graphql
elm install elm/json
npm i @dillonkearns/elm-graphql 

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!
Know of an article or package you'd like to appear in Elm Weekly? Tweet @elmweekly with a link or drop a line to hello@elmweekly.nl.
Elm Weekly · PO Box 460 · Cottleville MO 63338 · USA
Unsubscribe | View in browser