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
- Host: GitHub
- URL: https://github.com/eeue56/elm-debug-decoders
- Owner: eeue56
- License: bsd-3-clause
- Created: 2017-08-01T23:05:12.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-08-03T22:44:18.000Z (over 7 years ago)
- Last Synced: 2025-03-28T13:11:39.225Z (about 1 month ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)