From b4f2f00b4088a1ec0c8ecb332b133d8f6046a38e Mon Sep 17 00:00:00 2001 From: demingongo Date: Sat, 11 May 2024 23:23:33 +0200 Subject: [PATCH] engine --- package-lock.json | 4 ++-- package.json | 2 +- src/baseApp.ts | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1dfb737..c293ee2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@novice1/app", - "version": "0.3.2", + "version": "0.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@novice1/app", - "version": "0.3.2", + "version": "0.3.3", "license": "MIT", "dependencies": { "@novice1/logger": "^1.4.0", diff --git a/package.json b/package.json index d0d0edc..dbc38a0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@novice1/app", "private": false, - "version": "0.3.2", + "version": "0.3.3", "description": "Create Express applications.", "main": "lib/index.js", "homepage": "https://kisiwu.github.io/novice-app/latest/", diff --git a/src/baseApp.ts b/src/baseApp.ts index 3d53bed..dbd87d4 100644 --- a/src/baseApp.ts +++ b/src/baseApp.ts @@ -363,6 +363,12 @@ export abstract class BaseApp implements IApp { return this; } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + engine(ext: string, fn: (path: string, options: object, callback: (e: any, rendered?: string | undefined) => void) => void): this { + this.__app.engine(ext, fn) + return this + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any get(setting: string): any { return this.__app.get(setting);