Skip to content
Myr

Merge branch 'ejs'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parents 2bcea3a, 8d74136 · Browse files · 7 files+70 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+70 added−0 removed

  • tests:+14 added−0 removed
  • other:+56 added−0 removed

7 files+70 added−0 removed

added:examples/hello-world/views/front.html.ejs+2 added
1<h1><%= title %></h1>2<p>test</p>
added:examples/hello-world/views/layout.html.ejs+8 added
1<html>2 <head>3 <title><%= title %></title>4 </head>5 <body>6 <%= body %>7 </body>8</html>
added:examples/hello-world/app.js+17 added
added:lib/support/ejs/lib/ejs.js+25 added
modified:lib/express.js+1 added
modified:spec/spec.plugins.view.js+14 added
12ejs = require('ejs')34describe 'Express'5 before_each6 reset()7 end
14 unmodified lines
22 set('partials').should.eql 'magicland/partials'23 end24 end25 26 describe 'ejs'27 it 'should work without options'28 var str = '<h2><%= "Title" %></h2>'29 ejs.render(str).should.eql '<h2>Title</h2>'30 end31 32 it 'should work with locals'33 var str = '<h2><%= title %></h2>'34 ejs.render(str, { locals: { title: 'Title' }}).should.eql '<h2>Title</h2>'35 end36 end37 38 describe '#partial()'39 before_each40 set('views', 'spec/fixtures')41 set('partials', 'spec/fixtures/partials')
177 unmodified lines
modified:Makefile+3 added
22 unmodified lines
23 24app-chat:25 @$(NODE) examples/chat/app.js2627app-hello-world:28 @$(NODE) examples/hello-world/app.js2930app-upload:31 @$(NODE) examples/upload/app.js32 33app-coffee-upload: compile-coffee
13 unmodified lines