forked from appetizermonster/steempages
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
38 lines (31 loc) · 702 Bytes
/
Copy pathconfig.js
File metadata and controls
38 lines (31 loc) · 702 Bytes
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
'use strict';
const fse = require('fs-extra');
function applyConfigFile(file) {
if (!fse.existsSync(file))
return;
const configJson = require(file);
for (const key in config) {
if (key in configJson)
config[key] = configJson[key];
}
}
const config = {
AUTHOR: '',
REPO_URL: null,
API_TOKEN: '',
DELETE_ALL_POSTS_BEFORE_BUILD: false,
OVERWRITE_POSTS: false,
NO_PUSH: false,
EXCLUDE_TAGS: [],
EXCLUDE_PERMLINKS: []
};
// environment variables
const env = process.env;
for (const key in config) {
if (key in env)
config[key] = env[key];
}
// config.json
applyConfigFile('./config.json');
applyConfigFile('./config.public.json');
module.exports = config;