README.md in tilt-1.1 vs README.md in tilt-1.2
- old
+ new
@@ -36,10 +36,16 @@
Radius .radius radius
Markaby .mab markaby
Nokogiri .nokogiri nokogiri
CoffeeScript .coffee coffee-script (+node coffee)
+These template engines ship with their own Tilt integration:
+
+ ENGINE FILE EXTENSIONS REQUIRED LIBRARIES
+ -------------------------- ----------------- ----------------------------
+ Slim .slim slim (>= 0.7)
+
See [TEMPLATES.md][t] for detailed information on template engine
options and supported features.
[t]: http://github.com/rtomayko/tilt/blob/master/TEMPLATES.md
"Tilt Template Engine Documentation"
@@ -151,46 +157,15 @@
Tilt.register 'markdown', Tilt::BlueClothTemplate
Template Compilation
--------------------
-Tilt can compile generated Ruby source code produced by template engines and
-reuse on subsequent template invocations. Benchmarks show this yields a 5x-10x
+Tilt compiles generated Ruby source code produced by template engines and reuses
+it on subsequent template invocations. Benchmarks show this yields a 5x-10x
performance increase over evaluating the Ruby source on each invocation.
Template compilation is currently supported for these template engines:
StringTemplate, ERB, Erubis, Haml, and Builder.
-
-To enable template compilation, the `Tilt::CompileSite` module must be mixed in
-to the scope object passed to the template's `#render` method. This can be
-accomplished by including (with `Module#include`) the module in the class used
-for scope objects or by extending (with `Object#extend`) scope objects before
-passing to `Template#render`:
-
- require 'tilt'
-
- template = Tilt::ERBTemplate.new('foo.erb')
-
- # Slow. Uses Object#instance_eval to process template
- class Scope
- end
- scope = Scope.new
- template.render(scope)
-
- # Fast. Uses compiled template and Object#send to process template
- class Scope
- include Tilt::CompileSite
- end
- scope = Scope.new
- template.render(scope)
-
- # Also fast, though a bit a slower due to having to extend each time
- scope = Object.new
- scope.extend Tilt::CompileSite
- template.render(scope)
-
-When the `Tilt::CompileSite` module is not present, template execution falls
-back to evaluating the template from source on each invocation.
LICENSE
-------
Tilt is Copyright (c) 2010 [Ryan Tomayko](http://tomayko.com/about) and