forked from Sage-Bionetworks/Synapse-React-Client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
127 lines (124 loc) · 4.84 KB
/
styleguide.config.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
const path = require('path')
const pkg = require('./package.json');
const homePageComponents = ['src/lib/containers/home_page/**/[A-Z]*.tsx', 'src/lib/containers/widgets/themes-plot/**/ThemesPlot.tsx', 'src/lib/containers/**/UserCardListRotate.tsx', 'src/lib/containers/**/RssFeedCards.tsx', 'src/lib/containers/**/TableFeedCards.tsx', 'src/lib/containers/**/UpsetPlot.tsx', 'src/lib/containers/**/MarkdownSynapse.tsx']
const ignoreComponents = ['**/*.Mobile.tsx','**/*.Desktop.tsx']
module.exports = {
title: `Synapse React Components v${pkg.version}`,
tocMode: 'collapse',
pagePerSection: true,
skipComponentsWithoutExample: true,
styleguideComponents: {
Wrapper: path.resolve(__dirname, 'src/lib/containers/StyleGuidistComponentWrapper'),
},
sections: [
{
name: 'Introduction',
content: 'introduction.md'
},
{
name: 'Login/Logout',
description: 'Content depends on if you are logged in',
components: ['src/lib/containers/**/Login.tsx','src/lib/containers/**/Logout.tsx'],
},
{
name: 'Experimental Mode',
description: 'For components that are in experimental mode',
components: 'src/lib/containers/**/ExperimentalMode.tsx'
},
{
name: 'Home Page',
// content: 'docs/homepage.md'
description: 'Collection of components used in portal home pages',
components: homePageComponents,
ignore: ignoreComponents
},
{
name: 'Other Components',
// content: 'docs/all.md'
components: 'src/lib/containers/**/[A-Z]*.tsx',
ignore: [...ignoreComponents, ...homePageComponents]
},
{
name: 'Demos and non-components',
description: 'Demos or examples that are useful to display here that are not components.',
components: 'src/demo/containers/**/[A-Z]*.tsx',
},
],
require: [
path.join(__dirname, 'styleguide.setup.js'),
path.join(__dirname, 'styleguide.setup.css'),
path.join(__dirname, 'src/demo/style/DemoStyle.css'),
],
theme: {
maxWidth: 1300,
color: {
link: 'rgb(64, 123, 160)',
linkHover: 'rgb(64, 123, 160)'
},
fontFamily: {
base: '"Lato", Helvetica, sans-serif'
},
},
template: {
favicon: 'https://sage-bionetworks.github.io/Synapse-React-Client/favicon.png',
head: {
scripts: [
{
src:"https://cdn.jsdelivr.net/npm/[email protected]/dist/markdown-it.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-synapse.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-center-text.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-synapse-heading.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-synapse-table.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-strikethrough-alt.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-emphasis-alt.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-math.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-sup.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-sub.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-inline-comments.min.js",
},
{
src:"https://unpkg.com/[email protected]/dist/markdown-it-br.min.js",
},
{
src:"https://cdn.jsdelivr.net/npm/[email protected]/dist/markdown-it-container.min.js",
},
{
src:"https://cdn.jsdelivr.net/npm/[email protected]/dist/sanitize-html.min.js",
},
{
src:"https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js",
},
],
links: [
{
rel: 'stylesheet',
href: 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css'
},
{
rel: 'stylesheet',
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css'
}
]
}
}
}