TypeDoc all the thngs

This commit is contained in:
2021-03-25 08:50:13 -05:00
parent 7cb0546b01
commit fad1184afe
52 changed files with 976 additions and 3 deletions

View File

@@ -13,6 +13,10 @@ import {Config} from "../service/Config";
import {ViewEngine} from "./ViewEngine";
import {PugViewEngine} from "./PugViewEngine";
/**
* Dependency factory whose token matches the abstract ViewEngine class, but produces
* a particular ViewEngine implementation based on the configuration.
*/
export class ViewEngineFactory extends AbstractFactory {
protected readonly logging: Logging
protected readonly config: Config
@@ -50,6 +54,10 @@ export class ViewEngineFactory extends AbstractFactory {
return meta
}
/**
* Using the config, get the implementation of the ViewEngine that should be used in the application.
* @protected
*/
protected getViewEngineClass() {
const ViewEngineClass = this.config.get('server.view_engine.driver', PugViewEngine)