forked from patternfly/patternfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
patternfly-docs.source.js
30 lines (23 loc) · 1.1 KB
/
patternfly-docs.source.js
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
const path = require('path');
module.exports = sourceMD => {
// Theme pages
const themePagesPath = require.resolve('theme-patternfly-org/package.json').replace('package.json', 'pages');
sourceMD(path.join(themePagesPath, '*.md'), 'pages-overview');
// Core pages
sourceMD(path.join(__dirname, 'src/site/pages/*.md'), 'pages-html');
// Core MD
const coreDocsPath = path.join(__dirname, 'dist/docs');
const componentsMdFiles = path.join(coreDocsPath, 'components/**/examples/**/*.md');
const pagesMdFiles = path.join(coreDocsPath, 'pages/**/examples/**/*.md');
const layoutsMdFiles = path.join(coreDocsPath, 'layouts/**/examples/**/*.md');
const utilitiesMdFiles = path.join(coreDocsPath, 'utilities/**/examples/**/*.md');
sourceMD(componentsMdFiles, 'html');
sourceMD(pagesMdFiles, 'html');
sourceMD(layoutsMdFiles, 'html');
sourceMD(utilitiesMdFiles, 'html');
sourceMD(path.join(coreDocsPath, 'demos/**/*.md'), 'html-demos');
// Release notes
sourceMD(require.resolve('./RELEASE-NOTES.md'), 'html');
// Upgrade guides
sourceMD(require.resolve('./UPGRADE-GUIDE.md'), 'html');
};