eleventy-plugin-vento 3.2.0 → 3.4.0
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/CHANGELOG.md +34 -0
- package/package.json +6 -6
- package/readme.md +4 -1
- package/src/index.js +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# eleventy-plugin-vento
|
|
2
2
|
|
|
3
|
+
## 3.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8c6b8a2: Update `ventojs` to v1.12.11
|
|
8
|
+
|
|
9
|
+
## 3.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 387eb48: ⚠️ DEPRECATION NOTICE: Ignore tag `{{! ... }}` syntax is now deprecated and will be removed in 4.0.0.
|
|
14
|
+
|
|
15
|
+
This change comes in favor of using string literals to "pass through" tags without rendering them, like so:
|
|
16
|
+
|
|
17
|
+
```diff
|
|
18
|
+
- {{! if condition }}
|
|
19
|
+
+ {{ '{{ if condition }}' }}
|
|
20
|
+
do something
|
|
21
|
+
- {{! /if }}
|
|
22
|
+
- {{ '{{ /if }}' }}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
While more verbose, this change ensures that there isn't any ambiguity between a tag that needs ignoring and JS negation expressions:
|
|
26
|
+
|
|
27
|
+
```hbs
|
|
28
|
+
<!-- These are functionally equivalent and can lead to collisions in rendering functionality -->
|
|
29
|
+
|
|
30
|
+
{{! conditionStatementToIgnore }}
|
|
31
|
+
|
|
32
|
+
{{ !conditionStatementToIgnore }}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If an improved syntax for deferred rendering scenarios ever makes its way to Vento, it will be made available in this plugin.
|
|
36
|
+
|
|
3
37
|
## 3.2.0
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eleventy-plugin-vento",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Adds support for the Vento templating language to Eleventy.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": ">=18"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"debug": "4.3.7",
|
|
36
|
-
"ventojs": "1.12.
|
|
36
|
+
"ventojs": "1.12.11"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@11ty/eleventy": "3.0.0",
|
|
40
40
|
"@changesets/cli": "2.27.9",
|
|
41
|
-
"@eslint/js": "9.
|
|
42
|
-
"eslint": "9.
|
|
41
|
+
"@eslint/js": "9.14.0",
|
|
42
|
+
"eslint": "9.14.0",
|
|
43
43
|
"eslint-config-flat-gitignore": "0.3.0",
|
|
44
44
|
"eslint-config-prettier": "9.1.0",
|
|
45
45
|
"eslint-plugin-unicorn": "56.0.0",
|
|
46
|
-
"globals": "15.
|
|
46
|
+
"globals": "15.12.0",
|
|
47
47
|
"vitest": "2.1.4"
|
|
48
48
|
},
|
|
49
49
|
"prettier": {
|
package/readme.md
CHANGED
|
@@ -136,7 +136,7 @@ For paired shortcodes, the syntax is the same, just add a closing tag. Paired sh
|
|
|
136
136
|
|
|
137
137
|
If you'd prefer to set shortcodes yourself (via a plugin or other method) or prevent Eleventy from loading shortcodes into Vento, set `shortcodes: false` and/or `pairedShortcodes: false` in the plugin options.
|
|
138
138
|
|
|
139
|
-
> [!
|
|
139
|
+
> [!IMPORTANT]
|
|
140
140
|
> While it's straightforward to load filters via a Vento plugin that appends filters to the filters object as `env.filters.[filter_name]()`, creating custom tags in Vento is more involved. It's highly advised to keep these two options enabled unless you know what you're doing.
|
|
141
141
|
|
|
142
142
|
### Relevant Documentation
|
|
@@ -201,6 +201,9 @@ Vento: See [Auto Trim Plugin](https://vento.js.org/plugins/auto-trim/).
|
|
|
201
201
|
|
|
202
202
|
## Ignoring Tags
|
|
203
203
|
|
|
204
|
+
> [!WARNING]
|
|
205
|
+
> This feature is now deprecated as of version 3.3.0. I added it primarily for my own use case, however it can cause more issues than it solves (conflict with `!` negation syntax in JS, ambiguity between ignoring a tag and negating an expression in a template). See the 3.3.0 release notes for more information.
|
|
206
|
+
|
|
204
207
|
Exclusive to this plugin is the ability to skip processing a vento tag entirely and instead preserve the tag in the markup. This could be useful if you're doing some hybrid rendering and would like to defer certain tags from being processed until load time, so they can be rendered on the server.
|
|
205
208
|
|
|
206
209
|
This feature is enabled through use of the `enableIgnoreTag` plugin option.
|
package/src/index.js
CHANGED
|
@@ -58,6 +58,14 @@ export function VentoPlugin(eleventyConfig, userOptions) {
|
|
|
58
58
|
|
|
59
59
|
DEBUG.setup('Merged default and user config: %O', options);
|
|
60
60
|
|
|
61
|
+
if (options.ignoreTag) {
|
|
62
|
+
console.error(
|
|
63
|
+
'[eleventy-plugin-vento] DEPRECATION NOTICE:',
|
|
64
|
+
'Plugin was called with `ignoreTag` option, which has been deprecated.',
|
|
65
|
+
'For more information, see: https://github.com/noelforte/eleventy-plugin-vento/blob/main/readme.md#ignoring-tags'
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
61
69
|
// Get list of filters, shortcodes and paired shortcodes
|
|
62
70
|
const filters = eleventyConfig.getFilters();
|
|
63
71
|
DEBUG.setup('Reading filters from Eleventy: %o', filters);
|