An open API service indexing awesome lists of open source software.

https://github.com/eeue56/elm-debug-decoders

A tool for debugging decoders
https://github.com/eeue56/elm-debug-decoders

Last synced: 18 days ago
JSON representation

A tool for debugging decoders

Awesome Lists containing this project

README

        

# elm-debug-decoders
A tool for debugging decoders in Elm. This tool allows you to easily tell which decoders passed on the data you give it via a web UI.

## Install

This package requires `elm-interface-to-json` to be installed globally.

```
npm install -g elm-interface-to-json
npm install -g elm-debug-decoders
```

## Usage

This tool will generate an Elm file inside the directory you specifiy. It will use your `elm-package.json` in order to look up which decoders to pull things in from. Make sure to run `elm-make` in the directory prior to running `elm-debug-decoders`.

```
elm-make example/Main.elm

# Load the decoders in the example dir's elm-package.json
elm-debug-decoders --path example/

# Load the ones in the current directory
elm-debug-decoders
```

You then need to open the `DebugDecoders.elm` file inside elm-reactor, and paste your JSON into the text field!

It will also go through and find all the views you have that take in data that you have a decoder for. You may need to temporarily expose all your views in order to use this!

## Changelog

- 0.0.8 awesome redesign via @stil4m
- 0.0.7 the ability to automatically use the right views
- 0.0.5 sorting of decoders and ability to see what was decoded
- 0.0.4 (initial release)