-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
78 lines (76 loc) · 1.93 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
const path = require('path');
const { version } = require('./package');
const sections = require('./styleguide/sections');
module.exports = {
title: 'CoVende UI - Docs',
assetsDir: './docs/assets',
theme: './styleguide/theme.js',
styles: './styleguide/styles.js',
getComponentPathLine(componentPath) {
const name = path.basename(componentPath, '.js');
return `import { ${name} } from '@/common/components';`;
},
styleguideComponents: {
Wrapper: path.join(__dirname, 'styleguide/components/StyleGuideWrapper'),
LogoRenderer: path.join(__dirname, 'styleguide/components/Logo')
// StyleGuideRenderer: path.join(
// __dirname,
// 'styleguide/components/StyleGuideWrapper2'
// ),
// SectionsRenderer: path.join(
// __dirname,
// 'styleguide/components/SectionsRenderer'
// ),
},
previewDelay: 1200,
pagePerSection: true,
ignore: [
'**/__tests__/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/*.spec.{js,jsx,ts,tsx}',
'**/index.{js,jsx,ts,tsx}',
'**/theme.{js,jsx,ts,tsx}',
'**/_styles.{js,jsx,ts,tsx}',
'**/*.styles.{js,jsx,ts,tsx}',
'**/StyleGuideWrapper.js'
],
sections,
defaultExample: true,
usageMode: 'expand',
version,
// configureServer(app) {
// app.get('/ui-components', (req, res) => {
// res.status(200).send({response: 'Server invocado'});
// });
// },
webpackConfig: {
module: {
rules: [
{
test: /\.(js|ts)x?$/,
exclude: /node_modules/,
loader: 'babel-loader'
},
{
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: true
}
}
]
},
{
test: /\.svg$/,
loader: 'url-loader'
}
]
},
resolve: {
extensions: ['.js', 'jsx', '.ts', '.tsx', '.json']
}
}
};