forked from workshopbutler/js-widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
37 lines (33 loc) · 802 Bytes
/
config.js
File metadata and controls
37 lines (33 loc) · 802 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
const isDev = (process.env.NODE_ENV !== "build" && process.env.NODE_ENV !== "build-wordpress");
const environments = {
dev: {
backend: "http://127.0.0.1:9000/api-new/"
},
watch: {
backend: "https://api.workshopbutler.com/"
},
build: {
backend: "https://api.workshopbutler.com/"
},
"build-wordpress": {
backend: "https://api.workshopbutler.com/"
}
};
const options = {
apiKey: process.env.API_KEY,
theme: 'gatsby',
apiVersion: '2018-09-14',
};
const mapping = {
widgets: './app.ts',
templates: './templates.ts',
'styles': 'styles/common.less'
};
module.exports = {
isDev,
src: isDev ? 'site/static/' : `dist/`,
env: environments[process.env.NODE_ENV],
entry: mapping,
options: options,
wordpress: process.env.NODE_ENV === "build-wordpress"
};