express-handlebars
- Version 8.0.1
- Published
- 142 kB
- 3 dependencies
- BSD-3-Clause license
Install
npm i express-handlebars
yarn add express-handlebars
pnpm add express-handlebars
Overview
A Handlebars view engine for Express which doesn't suck.
Index
Functions
Classes
class ExpressHandlebars
class ExpressHandlebars {}
constructor
constructor(config?: ConfigOptions);
property compiled
compiled: CompiledCache;
property compilerOptions
compilerOptions: CompileOptions;
property config
config: ConfigOptions;
property defaultLayout
defaultLayout: string;
property encoding
encoding: BufferEncoding;
property engine
engine: Engine;
property extname
extname: string;
property handlebars
handlebars: HandlebarsImport;
property helpers
helpers: HelperDelegateObject;
property layoutsDir
layoutsDir: string;
property partialsDir
partialsDir: string | PartialsDirObject | (string | PartialsDirObject)[];
property precompiled
precompiled: PrecompiledCache;
property runtimeOptions
runtimeOptions: RuntimeOptions;
method getPartials
getPartials: ( options?: PartialTemplateOptions) => Promise<TemplateSpecificationObject | TemplateDelegateObject>;
method getTemplate
getTemplate: ( filePath: string, options?: PartialTemplateOptions) => Promise<HandlebarsTemplateDelegate | TemplateSpecification>;
method getTemplates
getTemplates: ( dirPath: string, options?: PartialTemplateOptions) => Promise<HandlebarsTemplateDelegate | TemplateSpecification>;
method render
render: ( filePath: string, context?: UnknownObject, options?: RenderOptions) => Promise<string>;
method renderView
renderView: { (viewPath: string): Promise<string>; (viewPath: string, options: RenderViewOptions): Promise<string>; (viewPath: string, callback: RenderCallback): Promise<null>; ( viewPath: string, options: RenderViewOptions, callback: RenderCallback ): Promise<null>;};
method resetCache
resetCache: ( filePathsOrFilter?: string | string[] | ((template: string) => boolean)) => void;
Package Files (2)
Dependencies (3)
Dev Dependencies (17)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/express-handlebars
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/express-handlebars)
- HTML<a href="https://www.jsdocs.io/package/express-handlebars"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3045 ms. - Missing or incorrect documentation? Open an issue for this package.