ecto 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/package.json +13 -22
package/README.md
CHANGED
|
@@ -125,7 +125,7 @@ const ecto = new Ecto();
|
|
|
125
125
|
|
|
126
126
|
When looking at the API there are two main methods to make note of:
|
|
127
127
|
[render](#render-from-string) (async) - Render from a string.
|
|
128
|
-
[renderFromFile](#render-from-file) (async) - Renders from a file path and will auto-select what engine to use based on the file extension. It will return a Promise<string
|
|
128
|
+
[renderFromFile](#render-from-file) (async) - Renders from a file path and will auto-select what engine to use based on the file extension. It will return a `Promise<string>` of the rendered output.
|
|
129
129
|
|
|
130
130
|
Two key parameters to know are:
|
|
131
131
|
defaultEngine:string - the [default engine](#default-engine) to use and set by default to ejs.
|
|
@@ -380,13 +380,11 @@ const ecto = Ecto();
|
|
|
380
380
|
await ecto.renderByFile("/path/to/file.md");
|
|
381
381
|
```
|
|
382
382
|
|
|
383
|
-
We are using [
|
|
383
|
+
We are using [Writr](https://writr.org/) which is remark with all the plugins and features you need.
|
|
384
384
|
|
|
385
385
|
#### Handlebars
|
|
386
386
|
|
|
387
|
-
In Ecto we use the [
|
|
388
|
-
|
|
389
|
-
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:
|
|
387
|
+
In Ecto we use the [Fumanchu](https://www.npmjs.com/package/@jaredwray/fumanchu) engine to render `mustache` and `handlebars` related templates. This is because handlebars is based on mustache with just more additional features. Fumanchu includes handlebar engine with helpers.
|
|
390
388
|
|
|
391
389
|
```javascript
|
|
392
390
|
const ecto = Ecto();
|
|
@@ -598,4 +596,4 @@ The double curly brace delimiters `{{ }}` denote output, and the curly brace per
|
|
|
598
596
|
|
|
599
597
|
# License
|
|
600
598
|
|
|
601
|
-
[MIT License - Copyright (c)
|
|
599
|
+
[MIT License - Copyright (c) Jared Wray](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ecto",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"description": "Modern Template Consolidation Engine for EJS, Markdown, Pug, Nunjucks, Liquid, and Handlebars",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/ecto.js",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"watch": "tsc -w -p .",
|
|
19
|
-
"clean": "rimraf ./dist yarn.lock package-lock.json ./coverage ./node_modules ./site/readme.md ./dist-site",
|
|
19
|
+
"clean": "rimraf ./dist yarn.lock package-lock.json pnpm-lock.yaml ./coverage ./node_modules ./site/readme.md ./dist-site",
|
|
20
20
|
"test": "xo --fix && vitest run --coverage",
|
|
21
21
|
"compile": "tsc -p .",
|
|
22
|
-
"build": "rimraf ./dist && npm
|
|
22
|
+
"build": "rimraf ./dist && npm run compile",
|
|
23
23
|
"prepare": "rimraf ./dist && npm run compile",
|
|
24
24
|
"website:build": "rimraf ./site/readme.md && npx -y docula build -s ./site -o ./dist-site",
|
|
25
25
|
"website:serve": "rimraf ./site/readme.md && npx -y docula serve -s ./site -o ./dist-site"
|
|
@@ -45,36 +45,27 @@
|
|
|
45
45
|
"liquidjs"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@jaredwray/fumanchu": "^1.
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"handlebars": "^4.7.8",
|
|
52
|
-
"handlebars-helpers": "^0.10.0",
|
|
53
|
-
"helper-date": "^1.0.1",
|
|
54
|
-
"liquidjs": "^10.10.1",
|
|
48
|
+
"@jaredwray/fumanchu": "^1.3.0",
|
|
49
|
+
"ejs": "^3.1.10",
|
|
50
|
+
"liquidjs": "^10.11.1",
|
|
55
51
|
"nunjucks": "^3.2.4",
|
|
56
52
|
"pug": "^3.0.2",
|
|
57
53
|
"underscore": "^1.13.6",
|
|
58
|
-
"
|
|
59
|
-
"writr": "^3.2.1"
|
|
54
|
+
"writr": "^3.2.2"
|
|
60
55
|
},
|
|
61
56
|
"devDependencies": {
|
|
62
57
|
"@types/ejs": "^3.1.5",
|
|
63
58
|
"@types/express": "^4.17.21",
|
|
64
|
-
"@types/
|
|
65
|
-
"@types/mustache": "^4.2.5",
|
|
66
|
-
"@types/node": "^20.11.25",
|
|
59
|
+
"@types/node": "^20.12.7",
|
|
67
60
|
"@types/nunjucks": "^3.2.6",
|
|
68
61
|
"@types/pug": "^2.0.10",
|
|
69
62
|
"@types/underscore": "^1.11.15",
|
|
70
|
-
"@vitest/coverage-v8": "^1.
|
|
71
|
-
"docula": "0.4.0",
|
|
63
|
+
"@vitest/coverage-v8": "^1.5.2",
|
|
72
64
|
"rimraf": "^5.0.5",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"xo": "^0.57.0"
|
|
65
|
+
"typescript": "^5.4.5",
|
|
66
|
+
"vitest": "^1.5.2",
|
|
67
|
+
"webpack": "^5.91.0",
|
|
68
|
+
"xo": "^0.58.0"
|
|
78
69
|
},
|
|
79
70
|
"xo": {
|
|
80
71
|
"ignores": [
|