-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathstyleguide.config.js
More file actions
72 lines (67 loc) · 1.93 KB
/
styleguide.config.js
File metadata and controls
72 lines (67 loc) · 1.93 KB
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
/* eslint-disable-next-line no-unused-vars */
const { ...webpackConfig } = require('./config/webpack/development')
webpackConfig.module.rules.push({
test: /\.s[ac]ss$/i,
use: [
// Creates `style` nodes from JS strings
'style-loader',
// Translates CSS into CommonJS
'css-loader',
// Compiles Sass to CSS
'sass-loader',
],
})
// const componentsGlob = p => path.join(p, '**/*{.js,jsx,ts,tsx}')
// const getComponentPathLine = componentPath => {
// const dir = componentPath
// .replace('app/javascript/ui/', '~')
// .replace(/\.(js|ts)x?/, '')
// const name = path.basename(componentPath, '.tsx')
// return `import ${name} from ${dir}`
// }
module.exports = {
title: 'Shape Styleguide',
showUsage: false,
skipComponentsWithoutExample: true,
// getComponentPathLine,
// sections: [
// {
// name: 'Shared Atoms',
// components: componentsGlob('./app/javascript/ui/shared/components/atoms'),
// },
// {
// name: 'Shared Molecules',
// components: componentsGlob(
// './app/javascript/ui/shared/components/molecules'
// ),
// },
// ],
components: 'app/javascript/ui/global/**/[A-Z]*.js',
ignore: [
'**/__tests__/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/*.spec.{js,jsx,ts,tsx}',
'**/*.d.ts',
'app/javascript/ui/shared/**/*',
],
// propsParser: reactDocgenTypescript.withDefaultConfig({
// propFilter: { skipPropsWithoutDoc: false },
// }).parse,
// resolver: reactDocgen.resolver.findAllComponentDefinitions,
// styleguideComponents: {
// Wrapper: path.join(__dirname, 'styleguidist/components/ThemeWrapper'),
// },
template: {
head: {
links: [
{
rel: 'stylesheet',
href:
'https://d2yp1lwhqo78df.cloudfront.net/assets/application-e76695f8303afddec6a82969f396f1657d3d42393f6c36d3bbf5f16c3d054ddf.css',
},
],
},
},
serverPort: 8000,
webpackConfig,
}