remove debugging

This commit is contained in:
Garrett Mills 2020-09-05 10:49:51 -05:00
parent d88a5353ae
commit 24762e4911
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246
2 changed files with 0 additions and 10 deletions

View File

@ -166,8 +166,6 @@ export default class Application {
app_root = app_root.slice(7)
}
console.log('app path', {parts, app_root})
const resolved = path.resolve(app_root, ...parts)
if ( resolved.startsWith('/') ) {
return `file://${resolved}`

View File

@ -57,7 +57,6 @@ export default class ViewEngine extends LifecycleUnit {
}
this.template_dir = this.app.app_path(base_dir)
console.log('view engine template dir', { base_dir, template_dir: this.template_dir })
this.engine = config
this.logger.info(`Determined view engine from config: ${config}`)
this.logger.info(`Determined base directory for templates: ${this.template_dir}`)
@ -98,17 +97,11 @@ console.log('view engine template dir', { base_dir, template_dir: this.template_
* @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 {
@ -192,7 +185,6 @@ console.log('template path resolved 1', resolved_path)
const partials_dir: unknown = this.config.get('app.views.partials_dir')
if ( String(partials_dir) ) {
let partials_path = this.template_path(String(partials_dir))
console.log({ partials_path, partials_dir })
this.logger.info(`Registering Handlebars partials from: ${partials_path}`)
if ( partials_path.startsWith('file://') ) {