Add water
This commit is contained in:
parent
d2c3c6b5ba
commit
fe1a382088
|
@ -17,6 +17,7 @@ Simplify developers' lives by abstracting template rendering for multiple templa
|
||||||
| Crikey | .crikey | [crikey](https://github.com/domgetter/crikey) | [@domgetter](https://github.com/domgetter) |
|
| Crikey | .crikey | [crikey](https://github.com/domgetter/crikey) | [@domgetter](https://github.com/domgetter) |
|
||||||
| Liquid | .liquid | [liquid](https://github.com/TechMagister/liquid.cr) | [@docelic](https://github.com/docelic) |
|
| Liquid | .liquid | [liquid](https://github.com/TechMagister/liquid.cr) | [@docelic](https://github.com/docelic) |
|
||||||
| Jbuilder | .jbuilder | [jbuilder](https://github.com/shootingfly/jbuilder) | [@shootingfly](https://github.com/shootingfly) |
|
| Jbuilder | .jbuilder | [jbuilder](https://github.com/shootingfly/jbuilder) | [@shootingfly](https://github.com/shootingfly) |
|
||||||
|
| Water | .water | [water](https://github.com/shootingfly/water) | [@shootingfly](https://github.com/shootingfly) |
|
||||||
|
|
||||||
See also:
|
See also:
|
||||||
[Registering your own template engine](#registering-your-own-template-engine).
|
[Registering your own template engine](#registering-your-own-template-engine).
|
||||||
|
|
|
@ -17,3 +17,5 @@ development_dependencies:
|
||||||
github: TechMagister/liquid.cr
|
github: TechMagister/liquid.cr
|
||||||
jbuilder:
|
jbuilder:
|
||||||
github: shootingfly/jbuilder
|
github: shootingfly/jbuilder
|
||||||
|
water:
|
||||||
|
github: shootingfly/water
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
span Process.pid
|
|
@ -0,0 +1,18 @@
|
||||||
|
require "../spec_helper"
|
||||||
|
require "../../src/water"
|
||||||
|
|
||||||
|
class WaterView
|
||||||
|
Kilt.file "spec/fixtures/test.water"
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "kilt/water" do
|
||||||
|
|
||||||
|
it "renders water" do
|
||||||
|
Kilt.render("spec/fixtures/test.water").should eq("<span>#{Process.pid}</span>")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "works with class" do
|
||||||
|
WaterView.new.to_s.should eq("<span>#{Process.pid}</span>")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
|
@ -0,0 +1,4 @@
|
||||||
|
require "./kilt"
|
||||||
|
require "water"
|
||||||
|
|
||||||
|
Kilt.register_engine "water", Water.embed
|
Loading…
Reference in New Issue