phoenix_slime
phoenix_slime copied to clipboard
Add phx.gen.live.slime LiveView generator
I've added a new mix task, phx.gen.live.slime that tries to follow the existing designs found in the phx.gen.live and phx.gen.html.slime generators as closely as possible.
The generated slimleex files should produce nearly identical HTML to what is currently provided by the stock Phoenix LiveView phx.gen.live generator (style, content, etc.)
I was surprised when I went to extend the stock Slime LiveView generators and found them missing. Hopefully this will help someone else as they start to build their apps with phoenix_slime.
Might be a deal breaker, but this PR requires a Phoenix version bump to ~> 1.5 because of the LiveView mix tasks included with it are used by the new phx.gen.live.slime generator.
Any quick thoughts on what to do about the linter? I can try to remove the templated .ex files and fallback to those provided by Phoenix itself if I can find the time. The files are interpolated/processed before they are turned into actual .ex files, which I why I believe the linter failed. Would an exemption for these templated .ex files be appropriate?
If the PR gets merged I'm happy to submit a quick PR updating the documentation/readme.
Great package, using Slime in Phoenix is awesome. Thanks for all your hard work!
Thank you for the PR @AnomalousBit! Both @Rakoth and I are pretty swamped these days so it may take us a little time to fully review this PR but we'll get to it :tada:
@AnomalousBit I'm making updates to both Slime and Phoenix Slime, would you like to rebase this PR on master? I can take care of it if you're unavailable.