
Episode 31
031: Elm Code Generation
We discuss different use cases for code generation in Elm applications, and our favorite code generation tips.
May 24, 20211h 7m
Audio is streamed directly from the publisher (cdn.simplecast.com) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.
Show Notes
What's the source of truth?
Teach the Elm compiler about external things like schemas
Macros in other languages
Vanilla code generation can be inspected and debugged like plain handwritten code
Gitignore gen code so you know you didn't forget to generate it on the build server
Watchers for rerunning codegen
Rerun code gen when the source of truth changes ideally
The Design of Everyday Things by Donald Norman
Affordances
Mappings
Scaffolding
elm-review init,new-rule, andnew-packageelm-spa new- html-to-elm.com
- End to end testing your generated code
- Snapshot testing
elm-graphql's snapshot testing script- html-to-elm.com generated test suite
elm-verify-examples