It appeared to me that there was a lot of repetition centered around creating custom sized or styled icons. Our use case requires many different sizes of the icons so I took a stab at cutting down the amount of code both on the elm side and the generated javascript.
I separated what is generally configurable about an icon (the width, height, color, fill ...), and what information is inseparable from the icon itself without altering the intention of the icon designer (name, viewBox).
I also introduced an integration test that renders all of the icons exported by the project into a grid in the same style as octicons.github.com so you can quickly spot check that everything is working.
In acknowledgment that each user probably has a different idea of what the best defaults are, I removed all helpers. Now there is only a single function per icon.
It appeared to me that there was a lot of repetition centered around creating custom sized or styled icons. Our use case requires many different sizes of the icons so I took a stab at cutting down the amount of code both on the elm side and the generated javascript. I separated what is generally configurable about an icon (the width, height, color, fill ...), and what information is inseparable from the icon itself without altering the intention of the icon designer (name, viewBox).
I also introduced an integration test that renders all of the icons exported by the project into a grid in the same style as octicons.github.com so you can quickly spot check that everything is working.
In acknowledgment that each user probably has a different idea of what the best defaults are, I removed all helpers. Now there is only a single function per icon.