Skip to content

Commit f779095

Browse files
committed
fix(tools)!: eleventy 3 support
1 parent 4799ed8 commit f779095

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

.changeset/spicy-islands-yawn.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
"@patternfly/pfe-tools": major
3+
---
4+
Removes `EleventyRenderPlugin` from custom-elements-manifest 11ty plugin config. Ensure you add it yourself.
5+
6+
Before:
7+
8+
```js
9+
module.exports = function(eleventyConfig) {
10+
eleventyConfig.addPlugin(CustomElementsManifestPlugin);
11+
}
12+
```
13+
14+
After:
15+
```js
16+
import { EleventyRenderPlugin } from '@11ty/eleventy'; // 3.0.0 only
17+
export default function(eleventyConfig) {
18+
eleventyConfig.addPlugin(CustomElementsManifestPlugin);
19+
eleventyConfig.addPlugin(EleventyRenderPlugin);
20+
}
21+
```

tools/pfe-tools/11ty/plugins/custom-elements-manifest.cjs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// @ts-check
2-
const { EleventyRenderPlugin } = require('@11ty/eleventy');
32
const { join } = require('node:path');
43
const { existsSync } = require('node:fs');
54
const { glob } = require('glob');
@@ -13,8 +12,6 @@ const isDir = dir => stat(dir).then(x => x.isDirectory, () => false);
1312
* @param {import('./types').PluginOptions} pluginOpts
1413
*/
1514
module.exports = function configFunction(eleventyConfig, pluginOpts = {}) {
16-
eleventyConfig.addPlugin(EleventyRenderPlugin);
17-
1815
eleventyConfig.addGlobalData('env', () => process.env);
1916

2017
eleventyConfig.addGlobalData('demos', async function demos() {

tools/pfe-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"**/*.{js,cjs,d.ts,map}"
6464
],
6565
"peerDependencies": {
66-
"@11ty/eleventy": "^2.0.1",
66+
"@11ty/eleventy": "^2.0.1 || ^3.0.0",
6767
"@11ty/eleventy-plugin-directory-output": "^1.0.1",
6868
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
6969
"@changesets/cli": "^2.27.1",

0 commit comments

Comments
 (0)