d91fe487a6
Because ghcid reloads leaves ghost threads sometime, when reloading VSCode. And disable launch-when-open in VSCode for that reason. |
||
---|---|---|
.github/workflows | ||
.vscode | ||
bin | ||
src | ||
.ghcid | ||
.gitignore | ||
CHANGELOG.md | ||
default.nix | ||
ema.cabal | ||
ema.svg | ||
flake.lock | ||
flake.nix | ||
hie.yaml | ||
LICENSE | ||
README.md | ||
shell.nix |
ema
ema is a WIP next-gen Haskell static site generator that is change-aware. In addition to static site generation, it provides a live server that hot-reload's on code or data change.
The ultimate goal of ema is to make it possible to easily implement your own neuron, or just about any app that creates a browser view of arbitrarily changing data (on disk, database, or whatever). ema is designed to facilitate creation of apps whose data is normally edited via traditional mechanisms (eg: text editor) but rendered as a delightful web page - so as to provide an economical read-only view, of your data, on desktop & mobile.
The simplest ema app looks like this:
main :: IO ()
main = do
let name :: Text = "Srid"
runEmaPure $ \() ->
encodeUtf8 $ "<b>Hello,</b> " <> name
Hacking
Run bin/run
(or Ctrl+Shift+B in VSCode). This runs the clock example; modify ./.ghcid
to run a different example.
TODO
- MVP
- Implement hot reload, and ditch browser-sync
- server to client refresh
- client to server reconnect (on ghcid reload, or accidental client disconnect)
- or, investigate https://hackage.haskell.org/package/ghci-websockets
- Multi-websocket-client support
- Refactor Server.hs
- Static site generation mode
- add common examples,
- filesystem watcher
- docs site for self (w/ sidebar and possibly even search)
pre-announce,
- plan features / messaging, re: hakyll
- Safer and simpler routes system
- Template system?
- CLI UX (opts, logging, etc.)
- documentation (howto)
- Publish Data.LVar to Hackage
doc notes,
- use async:race to avoid ghcid ghosts
- at most one ws client supported right now
- tailwind + blaze-html layout (BlazeWind?) for no-frills getting started