@@ -3,7 +3,7 @@ const _ = require('lodash');
3
3
const combineContexts = require ( './src/utilities/combine-contexts' ) ;
4
4
5
5
module . exports = {
6
- maximumWorkers : process . env . TRAVIS && 1 , // Faster on Travis
6
+ maximumWorkers : process . env . TRAVIS && 1 ,
7
7
template : {
8
8
file : path . join ( __dirname , 'template.ejs' )
9
9
} ,
@@ -13,96 +13,152 @@ module.exports = {
13
13
layout : ( ) => require ( './src/components/Site/Site.jsx' ) . default ,
14
14
paths : {
15
15
'/' : {
16
- content : ( ) => (
17
- require . context (
18
- './loaders/page-loader!./src/content' ,
19
- true ,
20
- / ^ \. \/ .* \. m d $ /
21
- )
22
- ) ,
16
+ title : "Home" ,
17
+ content : ( ) => require . context ( './loaders/page-loader!./src/content' , false , / ^ \. \/ .* \. m d $ / ) ,
23
18
index : ( ) => {
24
19
const index = require ( './src/components/Splash/Splash.jsx' ) . default ;
25
-
26
20
index . title = 'webpack' ;
27
21
index . description = 'webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset.' ;
28
22
29
23
return index ;
30
24
} ,
31
25
layout : ( ) => require ( './src/components/Page/Page.jsx' ) . default ,
32
- paths : {
33
- 'get-started' : {
34
- redirects : {
35
- '' : '/guides/getting-started' ,
36
- 'install-webpack' : '/guides/installation' ,
37
- 'why-webpack' : '/guides/why-webpack' ,
38
- }
39
- } ,
40
- guides : {
41
- redirects : {
42
- 'code-splitting-import' : '/guides/code-splitting-async' ,
43
- 'code-splitting-require' : '/guides/code-splitting-async/#require-ensure-' ,
44
- 'why-webpack' : '/guides/comparison' ,
45
- 'production-build' : '/guides/production'
46
- }
47
- } ,
48
- configuration : {
49
- redirects : {
50
- 'external-configs' : 'javascript-alternatives'
51
- }
52
- } ,
53
- api : {
54
- redirects : {
55
- 'passing-a-config' : 'configuration-types'
56
- }
57
- } ,
58
- pluginsapi : {
59
- redirects : {
60
- '' : '/api/plugins' ,
61
- 'compiler' : '/api/plugins/compiler' ,
62
- 'template' : '/api/plugins/template'
63
- }
64
- } ,
65
- loaders : {
66
- content : ( ) => {
67
- const content = require . context (
68
- './loaders/page-loader!./src/content/loaders' ,
69
- false ,
70
- / ^ \. \/ .* \. m d $ /
71
- ) ;
72
- const generated = require . context (
73
- './loaders/page-loader!./generated/loaders' ,
74
- false ,
75
- / ^ \. \/ .* \. m d $ /
76
- ) ;
77
-
78
- return combineContexts ( content , generated ) ;
79
- }
80
- } ,
81
- loaders : {
82
- content : ( ) => {
83
- const content = require . context (
84
- './loaders/page-loader!./src/content/plugins' ,
85
- false ,
86
- / ^ \. \/ .* \. m d $ /
87
- ) ;
88
- const generated = require . context (
89
- './loaders/page-loader!./generated/plugins' ,
90
- false ,
91
- / ^ \. \/ .* \. m d $ /
92
- ) ;
26
+ } ,
27
+ 'get-started' : {
28
+ title : 'Get Gtarted' ,
29
+ redirects : {
30
+ '' : '/guides/getting-started' ,
31
+ 'install-webpack' : '/guides/installation' ,
32
+ 'why-webpack' : '/guides/why-webpack' ,
33
+ }
34
+ } ,
35
+ api : {
36
+ title : "API" ,
37
+ content : ( ) => require . context ( './loaders/page-loader!./src/content/api' , false , / ^ \. \/ .* \. m d $ / ) ,
38
+ redirects : {
39
+ 'passing-a-config' : 'configuration-types'
40
+ } ,
41
+ url : ( { sectionName, fileName } ) => `/${ sectionName } /${ fileName } /` ,
42
+ transform : ( pages ) => {
43
+ return _ . sortBy ( pages , ( page ) => page . file . sort )
44
+ } ,
45
+ layout : ( ) => require ( './src/components/Page/Page.jsx' ) . default
46
+ } ,
47
+ pluginsapi : {
48
+ title : 'API Plugin' ,
49
+ redirects : {
50
+ '' : '/api/plugins' ,
51
+ 'compiler' : '/api/plugins/compiler' ,
52
+ 'template' : '/api/plugins/template'
53
+ } ,
54
+ hideInSidebar : true
55
+ } ,
56
+ concepts : {
57
+ title : "Comcepts" ,
58
+ content : ( ) => require . context ( './loaders/page-loader!./src/content/concepts' , false , / ^ \. \/ .* \. m d $ / ) ,
59
+ url : ( { sectionName, fileName } ) => `/${ sectionName } /${ fileName } /` ,
60
+ transform : ( pages ) => {
61
+ return _ . sortBy ( pages , ( page ) => page . file . sort )
62
+ } ,
63
+ layout : ( ) => require ( './src/components/Page/Page.jsx' ) . default
64
+ } ,
65
+ development : {
66
+ title : "Development" ,
67
+ content : ( ) => require . context ( './loaders/page-loader!./src/content/development' , false , / ^ \. \/ .* \. m d $ / ) ,
68
+ url : ( { sectionName, fileName } ) => `/${ sectionName } /${ fileName } /` ,
69
+ transform : ( pages ) => {
70
+ return _ . sortBy ( pages , ( page ) => page . file . sort )
71
+ } ,
72
+ layout : ( ) => require ( './src/components/Page/Page.jsx' ) . default
73
+ } ,
74
+ plugins : {
75
+ title : "Plugin" ,
76
+ content : ( ) => require . context ( './loaders/page-loader!./src/content/plugins' , false , / ^ \. \/ .* \. m d $ / ) ,
77
+ url : ( { sectionName, fileName } ) => `/${ sectionName } /${ fileName } /` ,
78
+ transform : ( pages ) => {
79
+ return _ . sortBy ( pages , ( page ) => page . file . sort )
80
+ } ,
81
+ layout : ( ) => require ( './src/components/Page/Page.jsx' ) . default
82
+ } ,
83
+ loaders : {
84
+ title : "Loaders" ,
85
+ content : ( ) => {
86
+ const content = require . context (
87
+ './loaders/page-loader!./src/content/loaders' ,
88
+ false ,
89
+ / ^ \. \/ .* \. m d $ /
90
+ ) ;
91
+ const generated = require . context (
92
+ './loaders/page-loader!./generated/loaders' ,
93
+ false ,
94
+ / ^ \. \/ .* \. m d $ /
95
+ ) ;
93
96
94
- return combineContexts ( content , generated ) ;
95
- }
96
- }
97
- }
97
+ return combineContexts ( content , generated ) ;
98
+ } ,
99
+ url : ( { sectionName , fileName } ) => `/ ${ sectionName } / ${ fileName } /` ,
100
+ layout : ( ) => require ( './src/components/Page/Page.jsx' ) . default
98
101
} ,
102
+ guides : {
103
+ title : "Guides" ,
104
+ content : ( ) => require . context ( './loaders/page-loader!./src/content/guides' , false , / ^ \. \/ .* \. m d $ / ) ,
105
+ redirects : {
106
+ 'code-splitting-import' : '/guides/code-splitting' ,
107
+ 'code-splitting-require' : '/guides/code-splitting' ,
108
+ 'code-splitting-async' : '/guides/code-splitting' ,
109
+ 'code-splitting-css' : '/guides/code-splitting' ,
110
+ 'code-splitting-libraries' : '/guides/code-splitting' ,
111
+ 'why-webpack' : '/guides/comparison' ,
112
+ 'production-build' : '/guides/production'
113
+ } ,
114
+ transform : ( pages ) => {
115
+ return _ . sortBy ( pages , ( page ) => page . file . sort )
116
+ } ,
117
+ url : ( { sectionName, fileName } ) => `/${ sectionName } /${ fileName } /` ,
118
+ layout : ( ) => require ( './src/components/Page/Page.jsx' ) . default
119
+ } ,
120
+ configuration : {
121
+ title : "Configuration" ,
122
+ content : ( ) => require . context ( './loaders/page-loader!./src/content/configuration' , false , / ^ \. \/ .* \. m d $ / ) ,
123
+ transform : ( pages ) => {
124
+ return _ . sortBy ( pages , ( page ) => page . file . sort )
125
+ } ,
126
+ transform : ( pages ) => {
127
+ return _ . sortBy ( pages , ( page ) => page . file . sort )
128
+ } ,
129
+ url : ( { sectionName, fileName } ) => `/${ sectionName } /${ fileName } /` ,
130
+ layout : ( ) => require ( './src/components/Page/Page.jsx' ) . default
131
+ } ,
132
+ support : {
133
+ title : "Support" ,
134
+ content : ( ) => require . context ( './loaders/page-loader!./src/content/support' , false , / ^ \. \/ .* \. m d $ / ) ,
135
+ transform : ( pages ) => {
136
+ return _ . sortBy ( pages , ( page ) => page . file . sort )
137
+ } ,
138
+ transform : ( pages ) => {
139
+ return _ . sortBy ( pages , ( page ) => page . file . sort )
140
+ } ,
141
+ url : ( { sectionName, fileName } ) => `/${ sectionName } /${ fileName } /` ,
142
+ layout : ( ) => require ( './src/components/Page/Page.jsx' ) . default
143
+ } ,
99
144
vote : ( ) => {
100
145
const page = require ( './src/components/Vote/List.jsx' ) . default ;
146
+ page . title = 'Vote' ;
101
147
148
+ return page ;
149
+ } ,
150
+ 'vote/feedback' : ( ) => {
151
+ const page = require ( './src/components/Vote/List.jsx' ) . default ;
102
152
page . title = 'Vote' ;
103
153
104
154
return page ;
105
- } ,
155
+ } ,
156
+ 'vote/moneyDistribution' : ( ) => {
157
+ const page = require ( './src/components/Vote/List.jsx' ) . default ;
158
+ page . title = 'Vote' ;
159
+
160
+ return page ;
161
+ } ,
106
162
organization : ( ) => {
107
163
const page = require ( './src/components/Organization/Organization.jsx' ) . default ;
108
164
0 commit comments