forked from nextcloud-libraries/nextcloud-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
146 lines (138 loc) · 3.38 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
const path = require('path');
const { merge } = require('webpack-merge');
const webpackConfig = require('./webpack.dev.js');
const newConfig = Object.assign({}, webpackConfig, {
externals: {},
module: {
// Ignore eslint
rules: webpackConfig.module.rules.filter(
rule => rule.use !== 'eslint-loader'
),
},
})
module.exports = {
require: [
path.join(__dirname, 'styleguide/global.requires.js'),
path.join(__dirname, 'styleguide/assets/icons.css'),
path.join(__dirname, 'styleguide/assets/additional.scss'),
],
pagePerSection: true,
minimize: true,
verbose: false,
webpackConfig: merge(newConfig, {
// https://webpack.js.org/configuration/dev-server/#devserverproxy
devServer: {
proxy: {
// redirect to the guest avatar endpoint
'/index.php/avatar': {
target: 'https://nextcloud.com/wp-content/themes/next/assets/img/common/nextcloud-square-logo.png',
changeOrigin: true,
ignorePath: true,
secure: false,
},
},
},
}),
exampleMode: 'expand',
usageMode: 'expand',
components: 'src/components/*/*.vue',
getComponentPathLine(componentPath) {
const name = path.basename(componentPath, '.vue')
return `import ${name} from '@nextcloud/vue/dist/Components/${name}'`
},
sections: [
{
name: 'Introduction',
content: 'docs/index.md',
exampleMode: 'hide',
usageMode: 'hide',
},
{
name: 'Directives',
content: 'docs/directives.md',
},
{
name: 'Components',
content: 'docs/components.md',
components: 'src/components/*/*.vue',
sectionDepth: 1,
ignore: [
'src/components/Action*/*.vue',
'src/components/AppContent*/*.vue',
'src/components/AppNavigation*/*.vue',
'src/components/AppSidebar*/*.vue',
'src/components/Breadcrumb*/*.vue',
'src/components/Content/*.vue',
'src/components/Multiselect*/*.vue',
'src/components/PopoverMenu/!(PopoverMenu).vue',
],
sections: [
{
name: 'Actions',
components: [
'src/components/Action*/*.vue',
],
},
{
name: 'App containers',
components: [
'src/components/Content/*.vue',
],
sections: [
{
name: 'AppNavigation',
components: [
'src/components/AppNavigation*/*.vue',
],
},
{
name: 'AppContent',
components: [
'src/components/AppContent*/*.vue',
],
},
{
name: 'AppSidebar',
components: [
'src/components/AppSidebar*/*.vue',
],
},
],
},
{
name: 'Breadcrumbs',
components: [
'src/components/Breadcrumb*/*.vue',
],
},
{
name: 'Multiselect',
components: [
'src/components/Multiselect/Multiselect.vue',
'src/components/MultiselectTags/MultiselectTags.vue',
],
},
],
},
],
ribbon: {
text: 'Fork me on GitHub',
url: 'https://github.com/nextcloud/nextcloud-vue',
},
// see https://github.com/styleguidist/react-styleguidist/blob/master/src/client/styles/theme.js
theme: {
maxWidth: '900px',
sidebarWidth: 280,
spaceFactor: 20,
color: {
link: '#0082c9',
linkHover: '#0082c9',
sidebarBackground: '#ffffff',
errorBackground: '#e22d44',
ribbonBackground: '#0082c9',
},
fontFamily: {
base: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
},
},
}