eleventy-plugin-vento 1.1.1 → 1.1.3
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/.github/actions/setup/action.yml +2 -3
- package/.github/workflows/{ci.yaml → ci.yml} +2 -1
- package/.github/workflows/release.yml +24 -19
- package/VentoPlugin.js +5 -5
- package/package.json +48 -45
- package/readme.md +1 -0
- package/release.config.js +24 -0
- package/test/input/permalinks.vto +7 -0
- package/test/input/root.vto +6 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
name:
|
|
2
|
-
description:
|
|
1
|
+
name: Setup
|
|
2
|
+
description: Setup project with pnpm
|
|
3
3
|
|
|
4
4
|
outputs:
|
|
5
5
|
cache-hit:
|
|
@@ -17,7 +17,6 @@ runs:
|
|
|
17
17
|
uses: actions/setup-node@v4
|
|
18
18
|
with:
|
|
19
19
|
node-version-file: .node-version
|
|
20
|
-
registry-url: 'https://registry.npmjs.org'
|
|
21
20
|
cache: pnpm
|
|
22
21
|
cache-dependency-path: pnpm-lock.yaml
|
|
23
22
|
|
|
@@ -2,35 +2,40 @@ name: Release
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
|
|
6
|
-
-
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- alpha
|
|
8
|
+
- beta
|
|
9
|
+
- next
|
|
10
|
+
- next-major
|
|
11
|
+
- v[0-9]+.[0-9]+.[0-9]+
|
|
12
|
+
- v[0-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+
|
|
7
13
|
|
|
8
14
|
jobs:
|
|
15
|
+
test:
|
|
16
|
+
uses: ./.github/workflows/ci.yml
|
|
17
|
+
|
|
9
18
|
release:
|
|
10
19
|
runs-on: ubuntu-latest
|
|
11
20
|
permissions:
|
|
12
|
-
|
|
13
|
-
|
|
21
|
+
contents: write # to be able to publish a GitHub release
|
|
22
|
+
id-token: write # to enable use of OIDC for npm provenance
|
|
23
|
+
issues: write # to be able to comment on released issues
|
|
24
|
+
pull-requests: write # to be able to comment on released pull requests
|
|
25
|
+
needs: test
|
|
14
26
|
steps:
|
|
15
27
|
- uses: actions/checkout@v4
|
|
28
|
+
with:
|
|
29
|
+
fetch-depth: 0
|
|
16
30
|
|
|
17
31
|
- name: Setup
|
|
18
32
|
uses: ./.github/actions/setup
|
|
19
33
|
|
|
20
|
-
- name:
|
|
21
|
-
run:
|
|
22
|
-
|
|
23
|
-
- name: Publish
|
|
24
|
-
env:
|
|
25
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
26
|
-
NPM_CONFIG_PROVENANCE: true
|
|
27
|
-
run: |
|
|
28
|
-
pnpm publish --no-git-checks --access public
|
|
29
|
-
|
|
30
|
-
- name: Write changelog
|
|
31
|
-
run: pnpm dlx changelogithub@latest --output CHANGELOG.md
|
|
34
|
+
- name: Verify provenance attestations and registry signatures
|
|
35
|
+
run: npm audit signatures
|
|
32
36
|
|
|
33
37
|
- name: Release
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
env:
|
|
39
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
40
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
41
|
+
run: pnpm exec semantic-release
|
package/VentoPlugin.js
CHANGED
|
@@ -49,15 +49,13 @@ export function VentoPlugin(eleventyConfig, options = {}) {
|
|
|
49
49
|
// Load user-defined plugins into vento
|
|
50
50
|
for (const plugin of options.plugins) env.use(plugin);
|
|
51
51
|
|
|
52
|
-
eleventyConfig.on('eleventy.before', () => {
|
|
53
|
-
env.cache.clear();
|
|
54
|
-
});
|
|
55
|
-
|
|
56
52
|
// Add vto as a template format and create a custom template for it
|
|
57
53
|
eleventyConfig.addTemplateFormats('vto');
|
|
58
54
|
eleventyConfig.addExtension('vto', {
|
|
59
55
|
outputFileExtension: 'html',
|
|
56
|
+
|
|
60
57
|
async compile(inputContent, inputPath) {
|
|
58
|
+
env.cache.clear();
|
|
61
59
|
return async (data) => {
|
|
62
60
|
if (options.addHelpers) {
|
|
63
61
|
// Extract a possible namespace from the addHelpers option
|
|
@@ -73,7 +71,9 @@ export function VentoPlugin(eleventyConfig, options = {}) {
|
|
|
73
71
|
else data = { ...data, ...helpers };
|
|
74
72
|
}
|
|
75
73
|
|
|
76
|
-
|
|
74
|
+
const result = await env.runString(inputContent, data, inputPath);
|
|
75
|
+
|
|
76
|
+
return result.content;
|
|
77
77
|
};
|
|
78
78
|
},
|
|
79
79
|
});
|
package/package.json
CHANGED
|
@@ -1,46 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
2
|
+
"name": "eleventy-plugin-vento",
|
|
3
|
+
"version": "1.1.3",
|
|
4
|
+
"description": "Adds support for the Vento templating language to Eleventy.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"packageManager": "pnpm@9.1.4",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=16"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "rm -rf test/output; cd test/input; eleventy",
|
|
12
|
+
"test-serve": "rm -rf test/output; cd test/input; eleventy --serve"
|
|
13
|
+
},
|
|
14
|
+
"main": "./VentoPlugin.js",
|
|
15
|
+
"repository": "git@github.com:noelforte/eleventy-plugin-vento.git",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/noelforte/eleventy-plugin-vento/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"eleventy",
|
|
21
|
+
"eleventy-plugin",
|
|
22
|
+
"ventojs",
|
|
23
|
+
"templating"
|
|
24
|
+
],
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "Noel Forte",
|
|
27
|
+
"email": "noel@forte.is",
|
|
28
|
+
"url": "https://forte.is/"
|
|
29
|
+
},
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"ventojs": "0.12.6"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@11ty/eleventy": "3.0.0-alpha.10",
|
|
36
|
+
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
37
|
+
"eslint": "9.4.0",
|
|
38
|
+
"eslint-config-flat-gitignore": "0.1.5",
|
|
39
|
+
"eslint-config-prettier": "9.1.0",
|
|
40
|
+
"globals": "15.3.0",
|
|
41
|
+
"semantic-release": "24.0.0"
|
|
42
|
+
},
|
|
43
|
+
"prettier": {
|
|
44
|
+
"bracketSameLine": true,
|
|
45
|
+
"singleQuote": true,
|
|
46
|
+
"semi": true,
|
|
47
|
+
"trailingComma": "es5"
|
|
48
|
+
}
|
|
49
|
+
}
|
package/readme.md
CHANGED
|
@@ -6,6 +6,7 @@ An [Eleventy](https://11ty.dev/) plugin that adds support for [Vento](https://ve
|
|
|
6
6
|
[Usage](#usage)<br>
|
|
7
7
|
[Plugin Options](#plugin-options)<br>
|
|
8
8
|
[Vento Filters](#vento-filters)<br>
|
|
9
|
+
[Vento Plugins](#vento-plugins)<br>
|
|
9
10
|
[JavaScript Helpers](#javascript-helpers)<br>
|
|
10
11
|
|
|
11
12
|
## Installing
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const presetConfig = {
|
|
2
|
+
types: [
|
|
3
|
+
{ type: 'feat', section: 'New Features' },
|
|
4
|
+
{ type: 'fix', section: 'Bug Fixes' },
|
|
5
|
+
{ type: 'refactor', section: 'Refactorings' },
|
|
6
|
+
{ type: 'docs', hidden: 'Documentation' },
|
|
7
|
+
{ type: 'chore', hidden: true },
|
|
8
|
+
{ type: 'perf', hidden: true },
|
|
9
|
+
{ type: 'style', hidden: true },
|
|
10
|
+
{ type: 'test', hidden: true },
|
|
11
|
+
],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @type {import('semantic-release').Options} */
|
|
15
|
+
export default {
|
|
16
|
+
preset: 'conventionalcommits',
|
|
17
|
+
presetConfig,
|
|
18
|
+
plugins: [
|
|
19
|
+
['@semantic-release/commit-analyzer'],
|
|
20
|
+
'@semantic-release/release-notes-generator',
|
|
21
|
+
'@semantic-release/npm',
|
|
22
|
+
'@semantic-release/github',
|
|
23
|
+
],
|
|
24
|
+
};
|