forked from docschina/webpack.js.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
antwar.config.js
executable file
·82 lines (81 loc) · 3.59 KB
/
antwar.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
const path = require('path');
const combineContexts = require('./src/utilities/combine-contexts');
module.exports = () => ({
maximumWorkers: process.env.TRAVIS && 1,
template: {
file: path.join(__dirname, 'template.ejs')
},
output: 'build',
title: 'webpack',
keywords: ['webpack', 'javascript', 'web development', 'programming'],
layout: () => require('./src/components/Site/Site.jsx').default,
paths: {
'/': {
title: 'Home',
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content', false, /^\.\/.*\.md$/),
index: () => require('./src/components/Splash/Splash.jsx').default
},
concepts: {
title: 'Concepts',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/concepts', false, /^\.\/.*\.md$/)
},
configuration: {
title: 'Configuration',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/configuration', false, /^\.\/.*\.md$/)
},
api: {
title: 'API',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/api', false, /^\.\/.*\.md$/)
},
guides: {
title: 'Guides',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/guides', false, /^\.\/.*\.md$/)
},
plugins: {
title: 'Plugins',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => {
return combineContexts(
require.context('./loaders/page-loader!./src/content/plugins', false, /^\.\/.*\.md$/),
require.context('./loaders/page-loader!./generated/plugins', false, /^\.\/.*\.md$/)
);
}
},
loaders: {
title: 'Loaders',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => {
return combineContexts(
require.context('./loaders/page-loader!./src/content/loaders', false, /^\.\/.*\.md$/),
require.context('./loaders/page-loader!./generated/loaders', false, /^\.\/.*\.md$/)
);
}
},
contribute: {
title: 'Contribute',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/contribute', false, /^\.\/.*\.md$/)
},
migrate: {
title: 'Migrate',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/migrate', false, /^\.\/.*\.md$/)
},
vote: () => require('./src/components/Vote/Vote.jsx').default,
organization: () => require('./src/components/Organization/Organization.jsx').default,
'starter-kits': () => require('./src/components/StarterKits/StarterKits.jsx').default
}
});