Elm Example Publisher

screenshot of Elm Example Publisher

Make a beautiful website from your Elm examples

Overview

The elm-example-publisher is a handy script designed for developers looking to showcase their Elm programs through a static website. Whether you want to highlight small visual examples or educational projects, this tool streamlines the process by converting your Elm code into an attractive and accessible format, complete with responsive images and clean presentation.

This tool functions by processing your Elm examples in stages, ensuring that each program is compiled, optimized, and captured effectively. With its customizable options, developers can tailor the output to meet specific requirements, making it a flexible asset for any Elm enthusiast.

Features

  • Example Gathering: Automatically scans a specified directory for Elm programs that export a main function, simplifying the process of collecting projects for display.

  • Compiling and Optimization: Compiles and compresses Elm programs into optimized files, ensuring consistent output dimensions while allowing for customization of output directories.

  • Screenshot Generation: Takes responsive screenshots of each Elm program's output using a Chromium instance, creating multiple image sizes for various display contexts.

  • Publishing to Ellie: Offers an optional feature to automatically upload your compiled examples to Ellie, enabling others to interact with your programs live.

  • Website Building: Loads a customizable Elm template to generate the final HTML structure for your showcase, making it easy to create a polished presentation.

  • Customizable Parameters: Allows for various command-line options to tailor input/output directories, dimensions, and whether to skip certain processes, giving developers full control over the build process.