From fa337864b4e0a9bd1af5d43e073d819b244e17b2 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Sat, 5 Sep 2020 10:29:30 -0500 Subject: [PATCH] debug view engine paths --- lib/src/unit/ViewEngine.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/src/unit/ViewEngine.ts b/lib/src/unit/ViewEngine.ts index 1ce78e6..f2a3a5f 100644 --- a/lib/src/unit/ViewEngine.ts +++ b/lib/src/unit/ViewEngine.ts @@ -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 {