forked from GetStream/react-native-activity-feed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
106 lines (103 loc) · 2.45 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
// @noflow
/* globals __dirname */
/* eslint-env commonjs*/
const path = require('path');
const webpack = require('webpack');
module.exports = {
title: 'React native activity feeds - Docs',
require: ['babel-polyfill'],
styleguideDir: 'docs',
sortProps: (props) => props,
styleguideComponents: {
PathlineRenderer: path.join(
__dirname,
'src/styleguideComponents/PathlineRenderer.js',
),
},
sections: [
{
name: 'Introduction',
content: 'docs/setup.md',
},
{
name: 'Top Level Components',
content: 'docs/top-level-components.md',
components: [
'src/Context/StreamApp.js',
'src/components/FlatFeed.js',
'src/components/NotificationFeed.js',
'src/components/SinglePost.js',
],
exampleMode: 'collapse',
usageMode: 'expand',
},
{
name: 'UI Components',
content: 'docs/other-components.md',
components: 'src/components/[A-Z]*.js',
ignore: [
'**/FlatFeed.js',
'**/NotificationFeed.js',
'**/SinglePost.js',
'**/CommentsContainer.js',
],
exampleMode: 'collapse',
usageMode: 'expand',
},
{
name: 'Cookbook',
content: 'docs/cookbook.md',
},
{
name: 'Styles',
content: 'docs/styles.md',
},
],
template: {
favicon: 'https://getstream.imgix.net/images/favicons/favicon-96x96.png',
},
webpackConfig: {
resolve: {
// auto resolves any react-native import as react-native-web
alias: { 'react-native': 'react-native-web' },
extensions: ['.web.js', '.js'],
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
options: {
plugins: ['react-native-web'],
presets: ['react-native'],
babelrc: false,
},
},
{
test: /\.(jpe?g|png|gif)$/i,
use: [
{
loader: 'file-loader',
options: {
hash: 'sha512',
digest: 'hex',
name: '[hash].[ext]',
},
},
],
},
{
test: /\.ttf$/,
loader: 'file-loader',
},
],
},
// Most react native projects will need some extra plugin configuration.
plugins: [
// Add __DEV__ flag to browser example.
new webpack.DefinePlugin({
__DEV__: process.env,
}),
],
},
};