Skip to content
Elm project showing an image directory structure
Elm
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
elm.json

README.md

image-directory

Elm project showing an image directory structure.

Usage

Include it in your project with the following command

elm install babsballetschool/image-directory

Import it in your source file with

import ImageDirectory

Retrieve from somewhere a JSON file like

{
  "type": "directory",
  "contents": [
    { "type": "file", "location":"http://via.placeholder.com/20x20"},
    { "type": "file", "location":"http://via.placeholder.com/20x30"},
    { "type": "directory", "contents": [{ "type": "file", "location":"http://via.placeholder.com/30x20"}] }
  ]
}

And decode it with ImageDirectory.decoder to obtain a ImageDirectory.Entry. It can be viewed ImageDirectory.view.

You can’t perform that action at this time.