Skip to content

Instantly share code, notes, and snippets.

@pete-murphy
Last active December 7, 2024 17:08
Show Gist options
  • Save pete-murphy/061ab66cf7d5957f62e374e3ebcff670 to your computer and use it in GitHub Desktop.
Save pete-murphy/061ab66cf7d5957f62e374e3ebcff670 to your computer and use it in GitHub Desktop.

elm-css Extraction

TODO

Step 0: setup

Clone this repo: https://github.com/bigardone/elm-css-patterns/blob/master/elm.json

  • Setup elm-review rule for quick edit/feedback cycle

Step 1: explore / analyze / clean-up

  • De-dupe ranges

  • Get a sense of scope: how many lines per module

  • Find/collect problematic cases

    • non-primitive/dynamic values / free variables

Step 2: simplify / normalize(?)

  • AST? representation

  • Further analyze: how many instances are very simple

Step 3: fix & record fixes

  • What recorded format? JSON? can we then load JSON in elm-review and use that to inform fixes?
  • AI somehow???

Appendix

Observable notebook of actual code https://observablehq.com/d/5480a664b168012a (make a copy of this for elm-css-patterns)

Maybe use this for inspo https://github.com/dillonkearns/elm-css-transpiler-demo/

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