Uses cases for elm-embed
For me to make good design decisions it is critical to know what people would like to use elm-embed for. So if you have a use case in mind, please leave a comment!
Target different servers for dev & prod
In production an app uses the production server. But when developing it can necessary to use a local dev server instead. Embedding an environment variable can be used to fix this.
Parse and embed markdown
Markdown is commonly used for static pages and is simpler than writing a page in Elm. elm-embed could be used to parse and embed markdown pages in an Elm application. This is an important component of making a Jamstack app.
It is currently possible to embed and parse a single page. But for elm-embed to be usable for this it would be necessary for a single embedder to parse multiple files. It would also be necessary for an embedder to output a record with the paths and other metadata for each file. This means that in addition to parsing multiple files, an embedder would also need to embed a record with a type that is determined at build-time.
Translation
I built a thing that downloaded JSON files at build time from a translation service and generated elm files full of strings. An environment variable was used to construct the URL. We then built the app once for each supported language.
No idea, if this is still maintained, but here we go:
I am going to Use elm as a form of dissemination for my Master's project. At least that is my plan. The idea is to explore different musical environments in Haskell noting down the process in Markdown documents (one for each environment). A bit like Jupyter Notebooks. These will then be used as input for an interactive web page (written in Elm) with animations, multimedia and transitions to explore the creative process across abstractions and library designs
The use case here is to provide a seamless N (multiple Markdowns) to 1 (Single Page with sections) without overkilling it like with Elm-Pages. Embedding a few files into my webpage at runtime is exactly the full feature-set I need.
Also I am using Windows, fortunately there is WSL2 😂
Wow, I'm so glad to se you'd find elm-embed potentially useful. You are correct that this is no longer maintained, and it never really got into an incredibly useful state either. I have vague memories (I'm no longer active in the Elm community) of other Elm projects that covered/are tangential to this and that maybe would be interesting for you to check out if you haven't already
- https://github.com/dillonkearns/elm-markdown
- https://github.com/mdgriffith/elm-codegen
- https://discourse.elm-lang.org/t/write-cli-scripts-in-elm-io-monad/7543
- https://www.lamdera.com/
If you want to use elm-embed I think you'd need to do some work on the codebase (elm-embed is a fork of the elm compiler so that's what type of complexity we're looking at), and I'd be happy to give pointers.