W2TAGS 0.9.3 is HAML for ERB
Develop your RAILS / SINATRA using HAML-like-command, at Production-Server run on ERB. W2Tags is the way to tags, a short cut / macros. When it do, it use some patern define in HOT file to produce tags from minimal code to become full fledge tags, Syntax mimics HAML to easy transisition, and proven to be use-able and best. just type “sudo gem install w2tags”. release-note.
Comments
I believe http://github.com/wharsojo/w2tags/tree/master to be a more relevant link.
Err, http://github.com/wharsojo/w2tags/tree/master.
Nope, I have difficulty updating github (on client behind firewall), and yes it suppose to be the edge on github. But for now, get it from rubyforge, its edge and stable… :)
“sudo gem install w2tags”, enjoy…
just wondering is this a replacement for HAML? what advantages does it have over HAML?
No, since HAML is a view engine and W2TAGS is a Parser which parse the HAML-like syntax to ERB, Benefit using W2TAGS are:
You can see that it not DRY, some patern will go to HOT files “rails_basic.hot“ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ »input %p %b $0.capitalize.gsub(‘’,’ ‘)- %br = f.text_field :$0
_submit !/ %p = f.submit “$0”
and code in source: ~~~~~~~~~~~~~~~~~~~ !hot!rails_basic %h1 New user = error_messages_for :user -form_for @user do |f| -input name;email;last_login -submit Create = link_to ‘Back’, users_path
too many if I List them all, you can see some of the benefit in Release note: http://rubyforge.org/frs/shownotes.php?group_id=6464&release_id=33258
and try it your self in irb: “w2tags -irb”
/wh
auch…, no pre :(
/wh
thanks for the explanation!
After reading the above, I still have no idea what this does. I realize the author’s native tongue is not English…can someone else sum it up?
Nice work. IMO, goodies in this lib should be added to HAML to improve reuse in HAML. Do you agree?
Post a comment