debug view engine paths

master
Garrett Mills 4 years ago
parent c8d9f80579
commit fa337864b4
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -94,11 +94,17 @@ export default class ViewEngine extends LifecycleUnit {
* @return string
*/
public template_path(...parts: string[]): string {
console.log('template path parts', parts)
if ( !this.template_dir ) throw new MissingTemplateDirectoryError()
let template_dir = this.template_dir
if ( template_dir.startsWith('file://') ) template_dir = template_dir.slice(7)
console.log('template path dir', template_dir)
const resolved_path = path.resolve(template_dir, ...parts)
console.log('template path resolved 1', resolved_path)
if ( resolved_path.startsWith('/') ) {
return `file://${resolved_path}`
} else {

Loading…
Cancel
Save