mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 12:19:51 +01:00
Added sass to the benchmarks
This commit is contained in:
parent
83fcf8b594
commit
f03694e21e
|
|
@ -9,7 +9,8 @@ print = puts
|
||||||
|
|
||||||
engine = {
|
engine = {
|
||||||
ejs: require('ejs'),
|
ejs: require('ejs'),
|
||||||
haml: require('haml')
|
haml: require('haml'),
|
||||||
|
sass: require('sass')
|
||||||
}
|
}
|
||||||
|
|
||||||
options = { locals: { article: { title: 'Foo', body: 'bar' }}}
|
options = { locals: { article: { title: 'Foo', body: 'bar' }}}
|
||||||
|
|
@ -24,6 +25,15 @@ haml = ' \n\
|
||||||
%p= article.body \n\
|
%p= article.body \n\
|
||||||
'
|
'
|
||||||
|
|
||||||
|
sass = ' \n\
|
||||||
|
body \n\
|
||||||
|
ul \n\
|
||||||
|
li \n\
|
||||||
|
a \n\
|
||||||
|
:color #ff0000 \n\
|
||||||
|
:list-style none \n\
|
||||||
|
'
|
||||||
|
|
||||||
suite('Template Engines', 1000, function(){
|
suite('Template Engines', 1000, function(){
|
||||||
benchmark('ejs', function(){
|
benchmark('ejs', function(){
|
||||||
engine.ejs.render(ejs, options)
|
engine.ejs.render(ejs, options)
|
||||||
|
|
@ -32,4 +42,8 @@ suite('Template Engines', 1000, function(){
|
||||||
benchmark('haml', function(){
|
benchmark('haml', function(){
|
||||||
engine.haml.render(haml, options)
|
engine.haml.render(haml, options)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
benchmark('sass', function(){
|
||||||
|
engine.sass.render(sass)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
Loading…
Reference in New Issue
Block a user