Skip to content
Myr

move default of "views" out so multiple cwd() calls are not made

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 · parent bf60d5a · Browse files · 1 file+4 added−3 removed
This commit

State

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

Diff stats

1 file+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:lib/application.js+4 added-3 removed
81 unmodified lines
82 // default locals83 this.locals.settings = this.settings;8485 // default configuration86 this.set('views', process.cwd() + '/views');87 this.set('jsonp callback name', 'callback');8889 this.configure('development', function(){90 this.set('json spaces', 2);
393 unmodified lines
484485 // view486 if (!view) {487 view = new View(name, {487 defaultEngine: this.get('view engine')488 , root: this.get('views') || process.cwd() + '/views'489 , engines: engines488 defaultEngine: this.get('view engine'),489 root: this.get('views'),490 engines: engines491 });492493 if (!view.path) {494 var err = new Error('Failed to lookup view "' + name + '"');
41 unmodified lines