This repository was archived by the owner on Jul 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyleguide.config.js
More file actions
128 lines (127 loc) · 2.52 KB
/
styleguide.config.js
File metadata and controls
128 lines (127 loc) · 2.52 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
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
/* eslint-disable @typescript-eslint/no-var-requires */
const {name: packageName, version} = require('./package.json');
const styles = require('./.styleguidist/styles');
const theme = require('./.styleguidist/theme');
const path = require('path');
/* eslint-enable @typescript-eslint/no-var-requires */
module.exports = {
title: packageName,
version,
require: [
path.resolve(__dirname, './.styleguidist/setup'),
],
template: {
head: {
links: [
{
rel: 'preconnect',
href: 'https://fonts.googleapis.com',
},
{
rel: 'preconnect',
href: 'https://fonts.gstatic.com',
crossorigin: true,
},
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&family=IBM+Plex+Sans&display=swap',
},
{
rel: 'stylesheet',
href: 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css',
integrity: 'sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3',
crossorigin: 'anonymous',
},
],
},
},
theme,
styles,
ribbon: {
text: 'Follow on Github',
url: 'https://github.com/boonya/react-hook-form-validation',
},
contextDependencies: [
path.resolve(__dirname, './docs'),
],
sections: [
{
name: 'README',
content: 'README.md',
sections: [
{
name: 'Installation',
href: '#installation',
},
{
name: 'Validators',
href: '#the-hook-currently-supports-the-following-validators',
},
],
},
{
name: 'Examples',
sections: [
{
name: 'Required',
content: 'docs/required.md',
},
{
name: 'Min Number',
content: 'docs/minNumber.md',
},
{
name: 'Max Number',
content: 'docs/maxNumber.md',
},
{
name: 'Min Length',
content: 'docs/minLength.md',
},
{
name: 'Max Length',
content: 'docs/maxLength.md',
},
{
name: 'Email',
content: 'docs/email.md',
},
{
name: 'URL',
content: 'docs/url.md',
},
{
name: 'Pattern',
content: 'docs/pattern.md',
},
{
name: 'Function',
content: 'docs/func.md',
},
{
name: 'Async Function',
content: 'docs/asyncFunction.md',
},
],
},
],
moduleAliases: {
'react-hook-form-validation': path.resolve(__dirname, './src/'),
},
webpackConfig: {
module: {
rules: [
{
test: /\.ts$/u,
exclude: /node_modules/u,
loader: 'ts-loader',
},
{
test: /\.js?$/u,
exclude: /node_modules/u,
loader: 'babel-loader',
},
],
},
},
};