-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
158 lines (154 loc) · 3.54 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
147
148
149
150
151
152
153
154
155
156
157
158
// eslint-disable-next-line @typescript-eslint/no-var-requires
const pkg = require("./package.json");
const parserOptions = {};
module.exports = {
title: "Binding Blocks",
ribbon: {
url: pkg.homepage,
text: "Fork me on GitHub",
},
template: {
head: {
links: [
{
rel: "stylesheet",
href:
"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css",
},
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/css?family=Roboto",
},
],
},
},
theme: {
fontFamily: {
base: '"Roboto", sans-serif',
},
},
sections: [
{
name: "Introduction",
content: "demo/INTRODUCTION.md",
sections: [
{
name: "Basic Example",
content: "demo/INTRO.BASIC.EXAMPLE.md",
exampleMode: "expand",
},
{
name: "Supported Types",
content: "demo/ADVANCED.EXAMPLE.md",
exampleMode: "expand",
},
{
name: "Remote Fetch",
content: "demo/INTRO.REMOTE.EXAMPLE.md",
exampleMode: "expand",
},
],
},
{
name: "Blocks",
content: "demo/BLOCKS.md",
sections: [
{
name: "<Binding />",
content: "demo/BLOCKS.BINDING.md",
exampleMode: "expand",
},
{
name: "<With />",
content: "demo/BLOCKS.WITH.md",
exampleMode: "expand",
},
{
name: "<Value />",
content: "demo/BLOCKS.VALUE.md",
exampleMode: "expand",
},
{
name: "<If />",
content: "demo/BLOCKS.IF.md",
exampleMode: "expand",
},
{
name: "<ForEach />",
content: "demo/BLOCKS.FOREACH.md",
exampleMode: "expand",
},
],
},
{
name: "Store",
content: "demo/Store.md",
exampleMode: "expand",
},
{
name: "DOM elements",
content: "demo/DOM.md",
exampleMode: "expand",
sections: [
{
name: "<Form />",
content: "demo/Form.Form.md",
exampleMode: "expand",
},
{
name: "<Input />",
content: "demo/Form.Input.md",
exampleMode: "expand",
},
{
name: "<Textarea />",
content: "demo/Form.Textarea.md",
exampleMode: "expand",
},
{
name: "<Select />",
content: "demo/Form.Select.md",
exampleMode: "expand",
},
{
name: "<Button />",
content: "demo/Form.Button.md",
exampleMode: "expand",
},
{
name: "Basic Form",
content: "demo/Form.Basic.md",
exampleMode: "expand",
},
{
name: "Table",
content: "demo/Form.Table.md",
exampleMode: "expand",
},
],
},
],
/**
* configs
*/
styleguideDir: "docs",
moduleAliases: {
"binding-blocks": require("path").resolve(__dirname, "src"),
},
webpackConfig: {
resolve: {
// Add ".ts" and ".tsx" as resolvable extensions.
extensions: [".ts", ".tsx", ".js", ".json"],
},
module: {
rules: [
// All files with a ".ts" or ".tsx" extension will be handled by "awesome-typescript-loader".
{ test: /\.tsx?$/, loader: "ts-loader" },
],
},
},
propsParser: require("react-docgen-typescript").withCustomConfig(
"./tsconfig.json",
[parserOptions]
).parse,
};