Closed sfcgeorge closed 5 years ago
I didn't know the feature, but it seems nice. What I knew is https://github.com/r7kamura/view_source_map, which might be more helpful if you mix .haml with .erb. If you think data-trace
is more helpful than the plugin or you're not using Rails, I'm okay with supporting it in Hamlit too.
Let me close this due to the inactivity. Please feel free to reopen this if you really wish to use the feature.
Just tried view_source_map, that's ideal actually, thank you for sharing 😄
This is a really useful feature of HAML where in development it adds
data-trace
to each HTML element with the path to the partial it came from. It's useful in large codebases or for new devs to find where things are defined. Right click, Inspect, find the element, copy the path :)http://haml.info/docs/yardoc/Haml/Options.html#trace-instance_method
Haml::Template.options[:trace] = true