forked from apostrophecms-legacy/apostrophe-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapos-config.js
76 lines (58 loc) · 1.84 KB
/
apos-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
'use strict';
const path = require('path');
const fs = require('fs');
// Config should be loaded before anything else happens.
// noinspection JSUnusedLocalSymbols
const config = require('./lib/config');
const customModuleNames = fs.readdirSync(path.resolve(__dirname, 'lib', 'modules'))
.filter(dp => /^custom-/.test(dp));
const customPiecesNames = customModuleNames.filter(moduleName => !/-(pages|widgets)$/.test(moduleName));
const customModules = customModuleNames.reduce(
(acc, dp) => {
acc[dp] = {};
return acc;
},
{}
);
const aposOptions = {
root: module,
shortName: 'apostrophe-boilerplate',
// See lib/modules for basic project-level configuration of our modules
// responsible for serving static assets, managing page templates and
// configuring user accounts.
modules: {
// Note: most configuration occurs in the respective
// modules' directories. See lib/apostrophe-assets/index.js for an example.
// However any modules that are not present by default in Apostrophe must at
// least have a minimal configuration here: `moduleName: {}`
'apostrophe-docs': {
// present clear error message every time a slug is in conflict, forcing a manual choice
deconflictSlugs: false
},
'apostrophe-admin-bar': {
addGroups: [
{
label: 'Custom Content',
items: customPiecesNames
}
]
},
'apostrophe-attachments': {
uploadfs: {
https: true
}
},
'apostrophe-db-mongo-3-driver': {},
'apostrophe-workflow': {},
// Boilerplate modules
'cr-typography': {},
'cr-1-column-widgets': {},
'cr-2-column-widgets': {},
'cr-3-column-widgets': {},
'cr-button-widgets': {},
'cr-footer-link-widgets': {},
'cr-embedded-video-widgets': {},
...customModules
}
};
module.exports = aposOptions;