Skip to content
Myr

Merge branch 'integration'

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

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parents 0bb7b7c, d775154 · Browse files · 4 files+23 added−1 removed
This commit

State

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

Diff stats

4 files+23 added−1 removed

  • tests:+19 added−0 removed
  • other:+4 added−1 removed

4 files+23 added−1 removed

modified:docs/guide.md+1 added
81 unmodified lines
82 * _env_ Application environment set internally, use _app.set('env')_ on _Server#listen()_83 * _home_ Application base path used for _res.redirect()_ and transparently handling mounted apps.84 * _views_ Root views directory defaulting to **CWD/views**85 * _view engine_ Default view engine name for views rendered without extensions86 * _partials_ Root view partials directory defaulting to _views_/partials. 8788### Routing8990Express utilizes the HTTP verbs to provide a meaningful, expressive routing API.
568 unmodified lines
modified:lib/express/view.js+3 added-1 removed
188 unmodified lines
189 }190191 // Partials support192 if (options.partial) {193 root = this.app.set('partials')194 ? this.app.set('partials')193 root += '/partials';195 : root + '/partials';196 }197198 // View path199 var path = view[0] === '/'
68 unmodified lines
added:test/fixtures/sub-templates/item.jade+1 added
1li.item= item
modified:test/view.test.js+18 added
345 unmodified lines
346 347 assert.response(app,348 { url: '/nothing' },349 { body: 'Hello' });350 },351 352 'test "partials" setting': function(assert){353 var app = create();354 app.set('partials', __dirname + '/fixtures/sub-templates');355356 app.get('/', function(req, res){357 res.render('items.jade', {358 layout: false,359 locals: {360 items: ['foo', 'bar']361 }362 });363 });364 365 assert.response(app,366 { url: '/' },367 { body: '<ul><li class="item">foo</li><li class="item">bar</li></ul>' });368 }369};