@patternfly/documentation-framework 1.4.16 → 1.5.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 +11 -0
- package/components/example/example.js +4 -1
- package/package.json +2 -2
- package/routes.js +2 -1
- package/scripts/md/parseMD.js +16 -6
- package/scripts/md/typecheck.js +2 -0
- package/scripts/webpack/webpack.base.config.js +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
# 1.5.0 (2023-02-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* add deprecated subpaths ([#3291](https://github.com/patternfly/patternfly-org/issues/3291)) ([b4324a7](https://github.com/patternfly/patternfly-org/commit/b4324a7ef10123a37ad8334e3b3da8be76fc35dc))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## 1.4.16 (2023-02-02)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -3,7 +3,9 @@ import { useLocation } from '@reach/router';
|
|
|
3
3
|
import { Badge, CodeBlock, CodeBlockCode, debounce, Switch } from '@patternfly/react-core';
|
|
4
4
|
import * as reactCoreModule from '@patternfly/react-core';
|
|
5
5
|
import * as reactCoreNextModule from '@patternfly/react-core/next';
|
|
6
|
+
import * as reactCoreDeprecatedModule from '@patternfly/react-core/deprecated';
|
|
6
7
|
import * as reactTableModule from '@patternfly/react-table';
|
|
8
|
+
import * as reactTableDeprecatedModule from '@patternfly/react-table/deprecated';
|
|
7
9
|
import { css } from '@patternfly/react-styles';
|
|
8
10
|
import { getParameters } from 'codesandbox/lib/api/define';
|
|
9
11
|
import { ExampleToolbar } from './exampleToolbar';
|
|
@@ -109,7 +111,8 @@ export const Example = ({
|
|
|
109
111
|
// These 2 are in the bundle anyways for the site since we dogfood
|
|
110
112
|
...reactCoreModule,
|
|
111
113
|
...reactTableModule,
|
|
112
|
-
...(source === 'react-next' ? reactCoreNextModule : {})
|
|
114
|
+
...(source === 'react-next' ? reactCoreNextModule : {}),
|
|
115
|
+
...(source === 'react-deprecated' ? {...reactCoreDeprecatedModule, ...reactTableDeprecatedModule} : {})
|
|
113
116
|
};
|
|
114
117
|
|
|
115
118
|
let livePreview = null;
|
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": "1.
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"react": "^16.8.0 || ^17.0.0",
|
|
85
85
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "8766a0630ac46ef293f0edc0ce2cd4b3cd095104"
|
|
88
88
|
}
|
package/routes.js
CHANGED
package/scripts/md/parseMD.js
CHANGED
|
@@ -61,7 +61,7 @@ function toReactComponent(mdFilePath, source, buildMode) {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
const propComponents = [...new Set(frontmatter.propComponents || [])].reduce((acc, componentName) => {
|
|
64
|
-
const name = getTsDocName(componentName, source
|
|
64
|
+
const name = getTsDocName(componentName, getTsDocNameVariant(source));
|
|
65
65
|
|
|
66
66
|
if (tsDocs[name]) {
|
|
67
67
|
acc.push(tsDocs[name]);
|
|
@@ -242,7 +242,7 @@ function sourcePropsFile(file) {
|
|
|
242
242
|
tsDocgen(file)
|
|
243
243
|
.filter(({ hide }) => !hide)
|
|
244
244
|
.forEach(({ name, description, props }) => {
|
|
245
|
-
tsDocs[getTsDocName(name, file
|
|
245
|
+
tsDocs[getTsDocName(name, getTsDocNameVariant(file))] = { name, description, props };
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
248
|
|
|
@@ -283,10 +283,20 @@ function writeIndex() {
|
|
|
283
283
|
return exitCode;
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
-
// Build unique names for components
|
|
287
|
-
function getTsDocName(name,
|
|
288
|
-
return `${name}${
|
|
289
|
-
}
|
|
286
|
+
// Build unique names for components with a "variant" extension
|
|
287
|
+
function getTsDocName(name, variant) {
|
|
288
|
+
return `${name}${variant ? `-${variant}` : ''}`;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
function getTsDocNameVariant(source) {
|
|
292
|
+
if (source.includes('next')) {
|
|
293
|
+
return 'next';
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
if (source.includes('deprecated')) {
|
|
297
|
+
return 'deprecated';
|
|
298
|
+
}
|
|
299
|
+
}
|
|
290
300
|
|
|
291
301
|
module.exports = {
|
|
292
302
|
sourceProps(glob, ignore) {
|
package/scripts/md/typecheck.js
CHANGED
|
@@ -118,8 +118,7 @@ module.exports = (_env, argv) => {
|
|
|
118
118
|
alias: {
|
|
119
119
|
'client-styles': path.resolve(process.cwd(), 'patternfly-docs/patternfly-docs.css.js'),
|
|
120
120
|
'./routes-client': path.resolve(process.cwd(), 'patternfly-docs/patternfly-docs.routes.js'),
|
|
121
|
-
'./routes-generated': path.resolve(process.cwd(), 'patternfly-docs/generated/index.js')
|
|
122
|
-
'@patternfly/react-core/next': '@patternfly/react-core/dist/esm/next/index.js' // Can remove when webpack is updated to v5
|
|
121
|
+
'./routes-generated': path.resolve(process.cwd(), 'patternfly-docs/generated/index.js')
|
|
123
122
|
},
|
|
124
123
|
modules: [
|
|
125
124
|
'node_modules',
|