remove debugging

master
Garrett Mills 4 years ago
parent d88a5353ae
commit 24762e4911
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

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

@ -57,7 +57,6 @@ export default class ViewEngine extends LifecycleUnit {
} }
this.template_dir = this.app.app_path(base_dir) 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.engine = config
this.logger.info(`Determined view engine from config: ${config}`) this.logger.info(`Determined view engine from config: ${config}`)
this.logger.info(`Determined base directory for templates: ${this.template_dir}`) 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 * @return string
*/ */
public template_path(...parts: string[]): string { public template_path(...parts: string[]): string {
console.log('template path parts', parts)
if ( !this.template_dir ) throw new MissingTemplateDirectoryError() if ( !this.template_dir ) throw new MissingTemplateDirectoryError()
let template_dir = this.template_dir let template_dir = this.template_dir
if ( template_dir.startsWith('file://') ) template_dir = template_dir.slice(7) 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) const resolved_path = path.resolve(template_dir, ...parts)
console.log('template path resolved 1', resolved_path)
if ( resolved_path.startsWith('/') ) { if ( resolved_path.startsWith('/') ) {
return `file://${resolved_path}` return `file://${resolved_path}`
} else { } else {
@ -192,7 +185,6 @@ console.log('template path resolved 1', resolved_path)
const partials_dir: unknown = this.config.get('app.views.partials_dir') const partials_dir: unknown = this.config.get('app.views.partials_dir')
if ( String(partials_dir) ) { if ( String(partials_dir) ) {
let partials_path = this.template_path(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}`) this.logger.info(`Registering Handlebars partials from: ${partials_path}`)
if ( partials_path.startsWith('file://') ) { if ( partials_path.startsWith('file://') ) {

Loading…
Cancel
Save