-
Notifications
You must be signed in to change notification settings - Fork 40
/
config.js
58 lines (56 loc) · 1.36 KB
/
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
const path = require('path');
const { env } = process;
module.exports = {
production: env.NODE_ENV === 'production',
cleanFilesOutsideWorkingDir: env.CLEAN_FILES_OUTSIDE_WORKING_DIR === 'true',
root: {
dev: env.ROOT_DEV,
dist: env.ROOT_DIST,
},
html: {
dev: env.HTML_DEV,
dist: env.HTML_DIST,
parts: env.HTML_PARTS,
run: env.HTML_RUN === 'true',
},
css: {
dev: env.CSS_DEV,
dist: env.CSS_DIST,
extensions: env.CSS_EXTENTIONS,
purge: env.CSS_PURGE === 'true',
purgeWhitelist: env.CSS_PURGE_WHITELIST ? env.CSS_PURGE_WHITELIST.split(',') : [],
purgeContent: env.CSS_PURGE_CONTENT ? env.CSS_PURGE_CONTENT.split(',') : [],
},
js: {
dev: env.JS_DEV,
dist: env.JS_DIST,
},
images: {
dev: env.IMAGES_DEV,
dist: env.IMAGES_DIST,
extensions: env.IMAGES_EXTENTIONS,
},
sprite: {
dev: env.SVG_SPRITE_DEV,
dist: env.SVG_SPRITE_DIST,
},
fonts: {
dev: env.FONTS_DEV,
dist: env.FONTS_DIST,
extensions: env.FONTS_EXTENTIONS,
},
static: {
dev: env.STATIC_DEV,
dist: env.STATIC_DIST,
},
browserSync: {
port: Number(env.BROWSER_SYNC_PORT),
proxy: {
target: env.BROWSER_SYNC_TARGET,
publicPath: env.BROWSER_SYNC_PUBLIC_PATH || path.join('/', env.JS_DIST),
files: [
path.join(env.ROOT_DIST, env.BROWSER_SYNC_FILES)
],
},
},
};