From 39fa5c6460c1208c39d919bae53bcb4f96617319 Mon Sep 17 00:00:00 2001 From: Jared Wray Date: Mon, 1 Aug 2022 10:28:47 -0700 Subject: [PATCH] migrating off handlebars-helpers to bug fixed version --- README.md | 8 ++++---- package.json | 2 +- src/engines/handlebars.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1ac1b0e..faa6ba0 100644 --- a/README.md +++ b/README.md @@ -362,9 +362,9 @@ We are using [Markdoc](https://markdoc.io/) which has a ton of powerful features #### Handlebars -In Ecto we use the [handlebars](https://www.npmjs.com/package/handlebars-helpers) engine to render `mustache` related templates. This is because handlebars is based on mustache with just more additional features. +In Ecto we use the [handlebars](https://www.npmjs.com/package/handlebars) engine to render `mustache` related templates. This is because handlebars is based on mustache with just more additional features. -Handlebars is a fantastic template engine, and we've incorporated helpers to make it even better. We added in [handlebars-helpers](https://www.npmjs.com/package/handlebars-helpers) so you can format dates, and more. Here is an example using `Handlebars Helpers` in your template: +Handlebars is a fantastic template engine, and we've incorporated helpers to make it even better. We added in [helpers-for-handlebars](https://github.com/jaredwray/helpers-for-handlebars) so you can format dates, and more. Here is an example using `Handlebars Helpers` in your template: ```javascript const ecto = Ecto(); @@ -570,9 +570,9 @@ The way Handlebars works can be summarized as follows: 2. This function is then executed by passing a JSON object as an argument. This JSON object is known as context and it contains the values of the variables used in the template. 3. On its execution, the function returns the required HTML after replacing the variables of the template with their corresponding values. -In Ecto, we use the [Handlebars](https://www.npmjs.com/package/handlebars-helpers) engine to render mustache-related templates. +In Ecto, we use the [Handlebars](https://www.npmjs.com/package/handlebars) engine to render mustache-related templates. -Handlebars is a fantastic template engine, and we've incorporated helpers to make it even better. We added in [handlebars-helpers](https://www.npmjs.com/package/handlebars-helpers) so you can format dates, and more. Here is an example using Handlebars Helpers in your template: +Handlebars is a fantastic template engine, and we've incorporated helpers to make it even better. We added in [helpers-for-handlebars](https://github.com/jaredwray/helpers-for-handlebars) so you can format dates, and more. Here is an example using Handlebars Helpers in your template: ```javascript diff --git a/package.json b/package.json index 952eb9b..808e685 100644 --- a/package.json +++ b/package.json @@ -39,8 +39,8 @@ "ejs": "^3.1.8", "fs-extra": "^10.1.0", "handlebars": "^4.7.7", - "handlebars-helpers": "^0.10.0", "helper-date": "^1.0.1", + "helpers-for-handlebars": "https://github.com/jaredwray/helpers-for-handlebars", "liquidjs": "^9.39.1", "nunjucks": "^3.2.3", "pug": "^3.0.2", diff --git a/src/engines/handlebars.ts b/src/engines/handlebars.ts index 6902336..a0e9d93 100644 --- a/src/engines/handlebars.ts +++ b/src/engines/handlebars.ts @@ -1,6 +1,6 @@ import { BaseEngine } from "../baseEngine"; import * as handlebars from "handlebars"; -import * as helpers from "handlebars-helpers"; +import * as helpers from "helpers-for-handlebars"; import * as fs from "fs-extra"; import * as _ from "underscore";