Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses cases for elm-embed #7

Open
emmabastas opened this issue Mar 16, 2021 · 5 comments
Open

Uses cases for elm-embed #7

emmabastas opened this issue Mar 16, 2021 · 5 comments

Comments

@emmabastas
Copy link
Owner

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!

@emmabastas
Copy link
Owner Author

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.

@emmabastas
Copy link
Owner Author

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.

@gampleman
Copy link
Contributor

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.

@thelayeredmind
Copy link

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 😂

@emmabastas
Copy link
Owner Author

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants