@patternfly/documentation-framework 5.2.18 → 5.2.20
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 +16 -0
- package/package.json +3 -3
- package/scripts/cli/cli.js +1 -0
- package/scripts/writeScreenshots.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 5.2.20 (2023-10-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 5.2.19 (2023-10-10)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## 5.2.18 (2023-10-09)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/documentation-framework",
|
|
3
3
|
"description": "A framework to build documentation for PatternFly.",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.20",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@babel/plugin-transform-react-jsx": "7.17.12",
|
|
18
18
|
"@babel/preset-env": "7.18.2",
|
|
19
19
|
"@mdx-js/util": "1.6.16",
|
|
20
|
-
"@patternfly/ast-helpers": "^1.2.
|
|
20
|
+
"@patternfly/ast-helpers": "^1.2.20",
|
|
21
21
|
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
|
|
22
22
|
"autoprefixer": "9.8.6",
|
|
23
23
|
"babel-loader": "9.1.2",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"react": "^17.0.0 || ^18.0.0",
|
|
88
88
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "2af5c909b93b8dac1b57794c5bc128110193881d"
|
|
91
91
|
}
|
package/scripts/cli/cli.js
CHANGED
|
@@ -46,6 +46,7 @@ program
|
|
|
46
46
|
.command('screenshots')
|
|
47
47
|
.option('-u, --urlPrefix <prefix>', 'where fullscreen pages are hosted', 'http://localhost:5000')
|
|
48
48
|
.option('-a, --allRoutes', 'true if screenshots of all examples - not just full screen', false)
|
|
49
|
+
.option('-f --filterTerm <term>', 'search term to filter routes by', '')
|
|
49
50
|
.description('updates screenshots for generated components')
|
|
50
51
|
.action(options => {
|
|
51
52
|
const { writeScreenshots } = require('../writeScreenshots');
|
|
@@ -27,7 +27,7 @@ async function writeScreenshot({ page, data: { url, urlPrefix } }) {
|
|
|
27
27
|
await sharp(buffer).toFile(outfile);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
async function writeScreenshots({ urlPrefix, allRoutes }) {
|
|
30
|
+
async function writeScreenshots({ urlPrefix, allRoutes, filterTerm }) {
|
|
31
31
|
const cluster = await Cluster.launch({
|
|
32
32
|
concurrency: Cluster.CONCURRENCY_CONTEXT,
|
|
33
33
|
maxConcurrency: os.cpus().length,
|
|
@@ -43,7 +43,9 @@ async function writeScreenshots({ urlPrefix, allRoutes }) {
|
|
|
43
43
|
|
|
44
44
|
// Add some pages to queue
|
|
45
45
|
Object.entries(fullscreenRoutes)
|
|
46
|
-
.filter(([, { isFullscreenOnly }]) => allRoutes ||
|
|
46
|
+
.filter(([url, { isFullscreenOnly }]) => allRoutes || (
|
|
47
|
+
isFullscreenOnly && (!filterTerm || url.includes(filterTerm.toLowerCase().split(' ').join('-')))
|
|
48
|
+
))
|
|
47
49
|
.forEach(([url,]) => cluster.queue({
|
|
48
50
|
url: `${urlPrefix}${url}`,
|
|
49
51
|
urlPrefix
|