MCPcopy Index your code
hub / github.com/eeue56/elm-static-html

github.com/eeue56/elm-static-html @1.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.3.2 ↗ · + Follow
8 symbols 13 edges 2 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

elm-static-html

Turn an Elm app into a static HTML site.

Your modules must look like this:

module Main exposing (..)

import Html
import Html.Attributes exposing (class, href)

view : Html.Html msg
view =
    Html.div []
        [ Html.h1 [ class "hello" ] [ Html.text "new!" ]
        , Html.a [ href "/login" ] [ Html.text "Login" ]
        , Html.text "hello"
        ]

then you can use


elm-static-html --filename Main.elm --output index.html

which will produce



<h1 class="hello">new!</h1><a href="https://github.com/eeue56/elm-static-html/raw/1.3.2/login">Login</a>hello


Flags

elm-static-html -f Main.elm will print the output to stdout by default You can create an initial config file through elm-static-html --init-config, though it's not needed to work.

You can use the config file to generate multiple files through elm-static-html -c elm-static-html.json. The config file looks like this:

{
    "files": {
        "<ElmFile.elm>": {
            "output": "<OutputFile.html>",
            "viewFunction": "view"
        },
        "<AnotherElmFile.elm": {
            "output": "<AnotherOutputFile.html>",
            "viewFunction": "someViewFunc"
        }
        /* ... */
    }
}

Notes

An .elm-static-html folder is created in order to generate the correct HTML and JS needed. You can delete it if you want, but it'll make builds a little slower.

Core symbols most depended-on inside this repo

standardizedConfig
called by 1
index.js
getModuleNames
called by 1
index.js
fixElmPackage
called by 1
index.js
importLines
called by 1
templates.js
viewFunctions
called by 1
templates.js
generateNativeModuleString
called by 0
templates.js
generateRendererFile
called by 0
templates.js
generateConfig
called by 0
templates.js

Shape

Function 8

Languages

TypeScript100%

Modules by API surface

templates.js5 symbols
index.js3 symbols

For agents

$ claude mcp add elm-static-html \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page