Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianhicks/learn-turbo-elm
https://github.com/brianhicks/learn-turbo-elm
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/brianhicks/learn-turbo-elm
- Owner: BrianHicks
- Created: 2023-12-22T23:35:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-02T15:36:31.000Z (12 months ago)
- Last Synced: 2024-12-09T19:53:37.995Z (14 days ago)
- Language: Elm
- Size: 77.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Learn Turbo
The point of this repo is to build an Elm project with tests and a TypeScript wrapper, along with hot reloading with elm-watch, to figure out how all these pieces fit together.
Running a build command executes npm commands using the Turbo graph, which works as you'd expect.
A production build just does a few different things, but is more or less the same.The complexity shows up with the dev servers.
When you run `turbo dev`, it starts:1. `browsersync`, which is configured to refresh the browser or do hot-reload for CSS for all assets but the Elm js
2. `html`, a `nodemon` process to continually copy changed HTML bootstrap code into `dist`
3. `css`, a `nodemon` process to automatically compile SCSS to CSS in `dist` (although I think `scss` might have a watcher? That'd be fine to switch to.)
4. `elm`, which runs the `elm-watch` server
5. `ts`, which runs `tsc --watch` to compile bootstrap JSAll those happen to work well enough together on file reloads that there's no custom code needed to plumb them all together.
As a bonus, they all happen to handle disconnect/reconnect gracefully, which makes restarting the server for config changes really straightforward.