-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.js
90 lines (81 loc) · 1.59 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
'use strict';
var pkg = require('./package.json'),
ip = require("ip").address();
/* ---------------------------------------------------------------------------------- */
// 변수
var src = './src'; // 소스경로
var test = './test'; // 테스트
var dist = './dist'; // 배포
var skinSrc = {
css: `${src}/skin/**/*.scss`,
js: `${src}/skin/**/*.js`,
img: `${src}/skin/**/img/*`
};
// 배너
var banner = `/**
* ${pkg.description}
* @author ${pkg.author.name}(${pkg.author.email})
* @version v${pkg.version}
* @license ${pkg.license}
*/
`;
// SASS 옵션
var sassOptions = {
errLogToConsole: true,
outputStyle: 'compact' // nested, expanded, compact, or compressed.
};
// 오토프리픽스 설정
var autoprefixerOptions = {
browsers: [
'ie >= 9',
'last 10 Chrome versions',
'last 10 Firefox versions',
'last 2 Opera versions',
'iOS >= 7',
'Android >= 4.1'
],
cascade: true,
remove: false
};
// 웹서버 설정
var webServerOptions = [
// 테스트 서버
// 배포버전 프록시 매핑
// http://localhost:8000
{
dir: test,
host: '0.0.0.0',
port: 8000,
livereload: false,
directoryListing: false,
open: false,
proxies: [
{
source: '/mplayer',
target: `http://${ip}:8100/dist`
}
]
},
// 배포버전 매핑용
{
baseDir: 'dist',
dir: './',
host: ip,
port: 8100,
livereload: false,
directoryListing: false,
open: false,
}
];
/* ---------------------------------------------------------------------------------- */
module.exports = {
pkg,
src,
test,
dist,
skinSrc,
banner,
sassOptions,
autoprefixerOptions,
webServerOptions
};