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

Feature/sfc.gen.init #3

Merged
merged 6 commits into from
Apr 25, 2021
Merged

Feature/sfc.gen.init #3

merged 6 commits into from
Apr 25, 2021

Conversation

lastobelus
Copy link
Owner

No description provided.

factored out common code between sfc.gen.component/init
implemented injection
TODO: come up with a demo component and templatize

refs #2
added insert_in_blocks_matching_fragment function which
(obstinately) uses regex to add code fragments to elixir
blocks (or to a quote do...end block inside an elixir block
Should have done it with leex or the actual elixir parser
test fixes after extracting common code
started writing tests for sfc.gen.init:
the phx.gen.live tests don't generate a full app,
just touch some files. I want to make sure my
injections stay robust to changes in phoenix, so I
run Mix.Tasks.Phx.New(~w(live_app --live)) first to
get all the pieces. There was no easy way to just extract
the pieces I need individually, plus that would be
just another way for the tests to get stale
tests for all the insertions
injects in `.formatter.exs`, `dev/config.exs`, and the view macro in
`lib/my_app_web.ex`.

optionally creates a demo card component in
either single-file or with  depending on
option
@lastobelus lastobelus merged commit 008fb75 into master Apr 25, 2021
@lastobelus
Copy link
Owner Author

refs #2

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

Successfully merging this pull request may close these issues.

1 participant