Add phx.gen.live.slime LiveView generator#85
Open
AnomalousBit wants to merge 8 commits intoslime-lang:masterfrom
Open
Add phx.gen.live.slime LiveView generator#85AnomalousBit wants to merge 8 commits intoslime-lang:masterfrom
AnomalousBit wants to merge 8 commits intoslime-lang:masterfrom
Conversation
…live_test.exs live testing template.
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 🎉 |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've added a new mix task,
phx.gen.live.slimethat tries to follow the existing designs found in thephx.gen.liveandphx.gen.html.slimegenerators as closely as possible.The generated
slimleexfiles should produce nearly identical HTML to what is currently provided by the stock Phoenix LiveViewphx.gen.livegenerator (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.slimegenerator.Any quick thoughts on what to do about the linter? I can try to remove the templated
.exfiles 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!