debug view engine paths
This commit is contained in:
parent
c8d9f80579
commit
fa337864b4
@ -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…
Reference in New Issue
Block a user