Modify canonical loading to allow either suffix.js or suffix.ts endings
This commit is contained in:
@@ -39,9 +39,10 @@ export class Routing extends Unit {
|
||||
this.logging.verbose('Registering @extollo view engine namespace.')
|
||||
engine.registerNamespace('extollo', lib().concat('resources', 'views'))
|
||||
|
||||
const suffix = `.routes${env('NODE_SCRIPT_SUFFIX', '.js')}`
|
||||
const jsSuffix = `.routes.js`
|
||||
const tsSuffix = `.routes.ts`
|
||||
for await ( const entry of this.path.walk() ) {
|
||||
if ( !entry.endsWith(suffix) ) {
|
||||
if ( !entry.endsWith(jsSuffix) && !entry.endsWith(tsSuffix) ) {
|
||||
this.logging.debug(`Skipping routes file with invalid suffix: ${entry}`)
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user