Skip to content

Commit

Permalink
Update docs framework (patternfly#7631)
Browse files Browse the repository at this point in the history
Co-locates docs related content under /patternfly-docs
Update to use new devDependency location theme-patternfly-org -> @patternfly/docs-framework
  • Loading branch information
jschuler authored Jul 6, 2022
1 parent 90d8af7 commit 649d2b8
Show file tree
Hide file tree
Showing 86 changed files with 1,568 additions and 828 deletions.
4 changes: 2 additions & 2 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"excludePackagePatterns": [
"@patternfly/patternfly",
"@patternfly/patternfly-a11y",
"theme-patternfly-org"
"@patternfly/documentation-framework"
],
"enabled": false
},
{
"datasources": ["npm"],
"packageNames": [
"@patternfly/patternfly-a11y",
"theme-patternfly-org"
"@patternfly/documentation-framework"
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.18.6",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.9.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ static/base.css
# Old build files
**/ts-output.json

# Files from theme-patternfly-org
src/generated/**/*.js
# Files from @patternfly/documentation-framework
patternfly-docs/generated/**/*.js
2 changes: 1 addition & 1 deletion packages/react-docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# React-docs

This project uses [theme-patternfly-org](https://github.com/patternfly/patternfly-org/tree/main/packages/theme-patternfly-org) to render example MD files.
This project uses [@patternfly/documentation-framework](https://github.com/patternfly/patternfly-org/tree/main/packages/documentation-framework) to render example MD files.

## Writing an MD file

Expand Down
10 changes: 5 additions & 5 deletions packages/react-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
"license": "MIT",
"scripts": {
"analyze": "yarn build:docs --analyze",
"build:docs": "yarn theme-patternfly-org build all",
"build:docs": "pf-docs-framework build all",
"clean": "rimraf .cache public static/assets static/base.css src/generated/**/*.js",
"develop": "theme-patternfly-org start",
"serve": "theme-patternfly-org serve public",
"screenshots": "theme-patternfly-org screenshots --urlPrefix http://localhost:5000",
"develop": "pf-docs-framework start",
"serve": "pf-docs-framework serve public",
"screenshots": "pf-docs-framework screenshots --urlPrefix http://localhost:5000",
"test:a11y": "patternfly-a11y --config patternfly-a11y.config"
},
"dependencies": {
Expand All @@ -40,7 +40,7 @@
"@patternfly/patternfly-a11y": "4.3.1",
"rimraf": "^2.6.3",
"shx": "^0.3.2",
"theme-patternfly-org": "0.12.0"
"@patternfly/documentation-framework": "^1.0.4"
},
"keywords": [
"gatsby"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-docs/patternfly-a11y.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { fullscreenRoutes } = require('theme-patternfly-org/routes');
const { fullscreenRoutes } = require('@patternfly/documentation-framework/routes');

/**
* Wait for a selector before running axe
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import '@patternfly/react-styles/src/css/components/Consoles/SerialConsole.css';
import '@patternfly/react-styles/src/css/components/Consoles/VncConsole.css';

// Global theme CSS
import 'theme-patternfly-org/global.css';
import '@patternfly/documentation-framework/global.css';

// Patternfly
import '@patternfly/patternfly/patternfly.css';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ const isClient = Boolean(process.env.NODE_ENV);

module.exports = {
'/': {
SyncComponent: isClient && require('./src/pages/index').default
SyncComponent: isClient && require('./pages/index').default
},
'/icons': {
Component: () => import(/* webpackChunkName: "icons/index" */ './src/pages/icons'),
Component: () => import(/* webpackChunkName: "icons/index" */ './pages/icons'),
title: 'Icons'
},
'/404': {
SyncComponent: isClient && require('theme-patternfly-org/pages/404').default,
SyncComponent: isClient && require('@patternfly/documentation-framework/pages/404').default,
title: '404 Error'
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ module.exports = (baseSourceMD, sourceProps) => {
const sourceMD = (basePath, ...props) => baseSourceMD(basePath.split(path.sep).join(path.posix.sep), ...props);

// Theme pages
const themePagesPath = require.resolve('theme-patternfly-org/package.json').replace('package.json', 'pages');
const themePagesPath = require
.resolve('@patternfly/documentation-framework/package.json')
.replace('package.json', 'pages');
sourceMD(path.join(themePagesPath, '*.md'), 'pages-overview');

// React props
Expand Down
Loading

0 comments on commit 649d2b8

Please sign in to comment.