-
Notifications
You must be signed in to change notification settings - Fork 12
/
gulp.config.js
68 lines (64 loc) · 1.75 KB
/
gulp.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
let basePaths = 'project-file-name'
let baseConfig = {
env: 'development',
isDev: true,
sourceMap: true,
sassStyle: 'compact',
cssRename: true,
paths: {
html: basePaths + '/src',
css: basePaths + '/src/scss',
script: basePaths + '/src/js',
image: basePaths + '/src/images'
},
pathsDev: {
html: basePaths + '/dist',
css: basePaths + '/dist/css',
script: basePaths + '/dist/js',
image: basePaths + '/dist/images'
},
pathsTest: {
html: basePaths + '/dist_test',
css: basePaths + '/dist_test/css',
script: basePaths + '/dist_test/js',
image: basePaths + '/dist_test/images'
},
pathsBuild: {
html: basePaths + '/build',
css: basePaths + '/build/css',
script: basePaths + '/build/js',
image: basePaths + '/build/images'
},
autoprefixerConfig: {
overrideBrowserslist: ['last 2 version']
},
base64Config: {
extensions: ['png'],
maxImageSize: 8 * 1024
},
cssUnit: 'px', // px | rem | viewport
pxtoviewportConfig: {
viewportWidth: 750,
viewportUnit: 'vmin'
},
pxtoremConfig: {
rootValue: 16,
unitPrecision: 4,
propList: ['*'],
selectorBlackList: [],
replace: true,
mediaQuery: false,
minPixelValue: 2
},
proxyOptions: {},
useWebpack: false
}
let projectConfig = require('./' + basePaths + '/project.config')
if (projectConfig) {
for (let k in projectConfig) {
if (projectConfig[k] !== undefined) {
baseConfig[k] = projectConfig[k]
}
}
}
module.exports = baseConfig