Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add phx.gen.live.slime LiveView generator #85

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

AnomalousBit
Copy link

@AnomalousBit AnomalousBit commented Nov 18, 2020

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!

@doomspork doomspork requested a review from a team November 18, 2020 15:39
@doomspork
Copy link
Member

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 🎉

@doomspork
Copy link
Member

@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.

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

Successfully merging this pull request may close these issues.

None yet

2 participants