1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

Add support for slim templating language (because I love it)

This commit is contained in:
Thomas Reynolds 2011-06-02 10:48:56 -07:00
parent 93f919f309
commit f3bd7bd3d1
7 changed files with 30 additions and 0 deletions

7
features/slim.feature Normal file
View file

@ -0,0 +1,7 @@
Feature: Support slim templating language
In order to offer an alternative to Haml
Scenario: Rendering Slim
Given the Server is running
When I go to "/slim.html"
Then I should see "<h1>Welcome to Slim</h1>"

View file

@ -2,6 +2,7 @@ with_layout false do
page "/inline-css.html"
page "/inline-js.html"
page "/inline-coffeescript.html"
page "/slim.html"
end
get "/page-class.html" do

View file

@ -0,0 +1,7 @@
doctype 5
html lang='en'
head
meta charset="utf-8"
body
h1 Welcome to Slim

View file

@ -67,6 +67,7 @@ module Middleman
module Renderers
autoload :Haml, "middleman/renderers/haml"
autoload :Sass, "middleman/renderers/sass"
autoload :Slim, "middleman/renderers/slim"
end
# Features API

View file

@ -0,0 +1,12 @@
module Middleman
module Renderers
module Slim
class << self
def registered(app)
require "slim"
end
alias :included :registered
end
end
end
end

View file

@ -73,6 +73,7 @@ module Middleman
end
# Activate custom renderers
register Middleman::Renderers::Slim
register Middleman::Renderers::Haml
register Middleman::Renderers::Sass

View file

@ -29,6 +29,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency("padrino-helpers", ["~> 0.9.23"])
s.add_runtime_dependency("rack-test", ["~> 0.5.0"])
s.add_runtime_dependency("uglifier", ["~> 0.5.0"])
s.add_runtime_dependency("slim", ["~> 0.9.4"])
s.add_runtime_dependency("haml", ["~> 3.1.0"])
s.add_runtime_dependency("coffee-filter", ["~> 0.1.0"])
s.add_runtime_dependency("sass", ["~> 3.1.0"])