Scalatags 0.2.2 Released

已查看 31 次
跳至第一个未读帖子

Haoyi Li

未读,
2014年1月19日 21:56:412014/1/19
收件人 scal...@googlegroups.com
Scalatags is a HTML generation library for Scala. This is mainly a polish release, in response to the feedback I got for version 0.2.0, and code using 0.2.0 should be almost source-compatible with 0.2.2. Main changes:
  • Greater flexibility over importsimport scalatags._ is now import scalatags.all._, and there are other import styles which you can pick (or even make up your own) in order to pick-your-poison how the importing/namespace-pollution happens. This should be the only backwards-incompatible change. 
  • Better IDE support: the inbuilt import scalatags.short._ import style leaves all attributes and styles as members of the * object, meaning you can type *. and let the IDE autocomplete show you what is available, similar to how things worked in 0.1.0
  • Weaker Typing: all attributes and styles now take Strings *in addition* to taking any more-specifically-typed values. This sacrifices some strictness but should greatly increase usability.
  • Much faster: 0.2.0 was about as fast as Play!'s templates, but 0.2.2 is about 4x faster than Play and 10-20x faster than Scalate templates on the microbenchmark I tested
  • Simpler data model: 0.2.2 strips out a lot of the clever lazy-evaluation stuff in 0.2.0 that was actually slowing things down in my benchmarks, making it much easier to apply filters or transformations on your fragments.
  • Fixed void/non-void tags: things like <script> now no longer self-close, as described by the HTML spec
Thanks for all the feedback everyone gave me on 0.2.2; I think I managed to managed to nail many of people's problems with 0.2.0.

Why 0.2.2 instead of 0.2.1? Because publishing to Maven Central is hard.
回复全部
回复作者
转发
0 个新帖子