1
1
mirror of https://github.com/srid/ema.git synced 2024-12-01 15:13:36 +03:00
ema/README.md

44 lines
1.5 KiB
Markdown
Raw Normal View History

2021-04-19 17:48:00 +03:00
# ema
<img width="10%" src="./docs/ema.svg">
2021-04-20 22:20:12 +03:00
2021-04-24 20:44:53 +03:00
Ema is a next-gen **Haskell** library for building [jamstack-style](https://jamstack.org/) static sites, with fast hot reload. See [ema.srid.ca](https://ema.srid.ca/) for documentation.
2021-04-19 17:48:00 +03:00
2021-04-24 20:44:53 +03:00
The simplest Ema app looks like this:
2021-04-19 18:18:38 +03:00
```haskell
main :: IO ()
main = do
let name :: Text = "Ema"
runEmaPure $
encodeUtf8 $ "<b>Hello</b>, from " <> name
2021-04-19 18:18:38 +03:00
```
2021-04-19 18:07:52 +03:00
## Hacking
2021-04-25 21:14:08 +03:00
Run `bin/run` (or <kbd>Ctrl+Shift+B</kbd> in VSCode). This runs the documentation example; modify `./.ghcid` to run a different example, such as the clock example - which updates every second, demonstrating hot reload.
2021-04-19 18:07:52 +03:00
## TODO
- [x] MVP
2021-04-19 22:34:10 +03:00
- [x] Implement hot reload, and ditch browser-sync
2021-04-19 18:07:52 +03:00
- [x] server to client refresh
- [x] client to server reconnect (on ghcid reload, or accidental client disconnect)
- [x] or, investigate https://hackage.haskell.org/package/ghci-websockets
- [x] Multi-websocket-client support
2021-04-22 23:11:21 +03:00
- [x] Static site generation mode
2021-04-24 19:35:54 +03:00
- [x] add common examples,
2021-04-21 00:51:14 +03:00
- [x] filesystem watcher
2021-04-24 19:35:54 +03:00
- [x] docs site for self (w/ breadcrumbs and possibly even search)
2021-04-20 01:51:27 +03:00
pre-announce,
2021-04-24 19:35:54 +03:00
- CLI UX
- [x] opts
- [ ] logging
2021-04-25 21:14:08 +03:00
- Expose it to apps (inc/ helpers) in a simple way
- [x] [deal with errors](https://github.com/srid/memoir/issues/1)
- [x] How to serve non-generated files (css, img, etc.)
2021-04-21 00:51:14 +03:00
- [ ] Publish Data.LVar to Hackage
2021-04-25 03:36:29 +03:00
- [ ] documentation ([guide](https://documentation.divio.com/))
2021-04-25 04:53:37 +03:00
- [x] Avoid tailwind CDN in docs (use twind or windicss) for better lighthouse score