express-handlebars
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -0,1 +1,8 @@ | ||
## [6.0.2](https://github.com/express-handlebars/express-handlebars/compare/v6.0.1...v6.0.2) (2021-11-25) | ||
### Bug Fixes | ||
* fix typescript in strict mode ([6833d8d](https://github.com/express-handlebars/express-handlebars/commit/6833d8dd4532e45790e04940b646e33f5fd07429)) | ||
## [6.0.1](https://github.com/express-handlebars/express-handlebars/compare/v6.0.0...v6.0.1) (2021-11-13) | ||
@@ -2,0 +9,0 @@ |
/// <reference types="node" /> | ||
/// <reference types="handlebars" /> | ||
import type { UnknownObject, FunctionObject, ConfigOptions, Engine, TemplateSpecificationObject, TemplateDelegateObject, FsCache, PartialTemplateOptions, PartialsDirObject, RenderOptions, RenderViewOptions, RenderCallback, HandlebarsImport, CompiledCache, PrecompiledCache } from "../types"; | ||
@@ -3,0 +4,0 @@ export default class ExpressHandlebars { |
{ | ||
"name": "express-handlebars", | ||
"description": "A Handlebars view engine for Express which doesn't suck.", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"homepage": "https://github.com/express-handlebars/express-handlebars", | ||
@@ -37,11 +37,11 @@ "keywords": [ | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/commit-analyzer": "^9.0.1", | ||
"@semantic-release/commit-analyzer": "^9.0.2", | ||
"@semantic-release/git": "^10.0.1", | ||
"@semantic-release/github": "^8.0.2", | ||
"@semantic-release/npm": "^8.0.3", | ||
"@semantic-release/release-notes-generator": "^10.0.2", | ||
"@semantic-release/release-notes-generator": "^10.0.3", | ||
"@types/glob": "^7.2.0", | ||
"@types/jest": "^27.0.2", | ||
"@typescript-eslint/eslint-plugin": "^5.3.1", | ||
"@typescript-eslint/parser": "^5.3.1", | ||
"@types/jest": "^27.0.3", | ||
"@typescript-eslint/eslint-plugin": "^5.4.0", | ||
"@typescript-eslint/parser": "^5.4.0", | ||
"eslint": "^7.32.0", | ||
@@ -53,5 +53,5 @@ "eslint-config-standard": "^16.0.3", | ||
"jest-cli": "^27.3.1", | ||
"semantic-release": "^18.0.0", | ||
"semantic-release": "^18.0.1", | ||
"ts-jest": "^27.0.7", | ||
"typescript": "^4.4.4" | ||
"typescript": "^4.5.2" | ||
}, | ||
@@ -58,0 +58,0 @@ "release": { |
@@ -101,3 +101,3 @@ Express Handlebars | ||
app.set('view engine', 'handlebars'); | ||
app.set("views", "./views"); | ||
app.set('views', './views'); | ||
@@ -162,3 +162,3 @@ app.get('/', (req, res) => { | ||
app.set('view engine', 'handlebars'); | ||
app.set("views", "./views"); | ||
app.set('views', './views'); | ||
@@ -233,3 +233,3 @@ // ...still have a reference to `hbs`, on which methods like `getPartials()` | ||
app.set('view engine', 'handlebars'); | ||
app.set("views", "./views"); | ||
app.set('views', './views'); | ||
@@ -326,2 +326,3 @@ app.get('/', (req, res, next) => { | ||
// Using the class: | ||
new ExpressHandlebars({ /* config */}) | ||
@@ -348,3 +349,3 @@ ``` | ||
app.set('view engine', '.hbs'); | ||
app.set("views", "./views"); | ||
app.set('views', './views'); | ||
``` | ||
@@ -351,0 +352,0 @@ |
@@ -5,2 +5,3 @@ import * as path from "path"; | ||
TemplateDelegateObject, | ||
EngineOptions, | ||
} from "../types"; | ||
@@ -369,3 +370,3 @@ | ||
const viewPath = fixturePath("render-text.handlebars"); | ||
const html = await renderView(viewPath, { text: "test text" }); | ||
const html = await renderView(viewPath, { text: "test text" } as EngineOptions); | ||
expect(html).toBe("<p>test text</p>"); | ||
@@ -372,0 +373,0 @@ }); |
@@ -0,1 +1,3 @@ | ||
/// <reference types="handlebars" /> | ||
export interface UnknownObject { | ||
@@ -65,3 +67,3 @@ [index: string]: unknown | ||
export interface HandlebarsImport { | ||
[index: string]: any; | ||
[index: string]: unknown; | ||
compile: HandlebarsCompile; | ||
@@ -91,2 +93,2 @@ precompile: HandlebarsPrecompile; | ||
export type Engine = (viewPath: string, options: EngineOptions, callback?: RenderCallback) => Promise<string> | ||
export type Engine = (viewPath: string, options: ConfigOptions, callback?: RenderCallback) => Promise<string> |
136659
1723
608