-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
83 lines (81 loc) · 1.94 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
const path = require('path')
const docSiteUrl = process.env.DEPLOY_PRIME_URL || 'https://vue-styleguidist.github.io'
/** @type import("vue-styleguidist").Config */
module.exports = {
title: 'Vue Design System',
components: 'src/components/**/[A-Z]*.vue',
version: require('./package.json').version,
ribbon: {
text: 'Back to examples',
url: `${docSiteUrl}/Examples.html`
},
/**
* Enabling the following option splits sections into separate views.
*/
pagePerSection: true,
simpleEditor: true,
template: {
title: 'Example — Vue Design System',
lang: 'en',
trimWhitespace: true,
head: {
meta: [
{
name: 'viewport',
content: 'width=device-width,initial-scale=1.0'
},
{
name: 'format-detection',
content: 'telephone=no'
}
]
}
},
/**
* remove the component pathline
*/
getComponentPathLine: () => '',
/**
* load the vueds color scheme
*/
theme: './styleguide/vueds-theme.ts',
styles: './styleguide/vueds-styles.js',
/**
* import the webpack config from the project. It might be useful to add
* a babel loader to get the jsx to work properly for custom components
*/
webpackConfig: require('./webpack.config'),
/**
* We’re defining below JS and SCSS requires for the documentation.
*/
require: [
/**
* load the custom font
*/
path.join(__dirname, 'styleguide/loadfont.js')
],
/**
* Make sure sg opens with props and examples visible
*/
usageMode: 'expand',
exampleMode: 'expand',
styleguideComponents: {
ReactComponentRenderer: path.join(__dirname, 'styleguide/components/ReactComponent'),
PlaygroundRenderer: path.join(__dirname, 'styleguide/components/Playground')
},
styleguideDir: 'dist',
sections: [
{
name: 'Getting Started',
content: './docs/getting-started.md',
sectionDepth: 1
},
{
name: 'Elements',
content: './docs/elements.md',
pagePerSection: true,
components: './src/components/**/[A-Z]*.vue',
sectionDepth: 2
}
]
}