UNPKG

3.02 kBJavaScriptView Raw
1var destMod = {
2 output: './dist/dest',
3 minify: true,
4 minifyHTML: true,
5 bundle: true,
6 concat: true,
7 less: true,
8 inline: false,
9 codeCount: true, //代码统计
10 sourcemap: false,
11 watchFolder: null,
12 custom: {
13 js: [],
14 css: [],
15 imgs: [],
16 html: []
17 },//自定义任务
18 define: {
19 __DEST__: true,
20 __DEV__: false,
21 __RD__: false,
22 __QA__: false
23 },
24 server: false,
25 buildTarget: {
26 js: './js/',
27 css: './css/',
28 imgs: './images/',
29 html: './html/'
30 },
31};
32
33var rdMod = Object.assign({}, destMod);
34var qaMod = Object.assign({}, destMod);
35
36rdMod.output = './dist/rd';
37qaMod.output = './dist/qa';
38rdMod.define = {
39 __DEST__: false,
40 __DEV__: false,
41 __RD__: true,
42 __QA__: false
43};
44qaMod.define = {
45 __DEST__: false,
46 __DEV__: false,
47 __RD__: false,
48 __QA__: true
49};
50
51/* eslint-disable */
52module.exports = {
53 src: './src',
54
55 entries: ['./src/html/**', './src/*.html'],
56
57 ignore: ['./src/lib'],
58
59 imgFolder: './src/images',
60
61 moveList: ['./src/lib'], //需要平移的目录和文件
62
63 devMod: {
64 entries: ['./src/html/**', './src/*.html'], //每种模式下内部的entries会覆盖外部的
65 output: './dev',
66 minify: false,
67 minifyHTML: false,
68 bundle: true,
69 concat: false,
70 sourcemap: true,
71 less: true,
72 inline: false,
73 codeCount: false, //代码统计
74 watchFolder: {
75 css: ['./src/css'],
76 js: ['./src/js'],
77 imgs: ['./src/images'],
78 html: ['./src/html']
79 },
80 define: {
81 __DEST__: false,
82 __DEV__: true,
83 __RD__: false,
84 __QA__: false
85 }, //webpack环境变量定义,非webpack模式不生效
86 custom: {
87 js: [],
88 css: [],
89 imgs: [],
90 html: []
91 },//自定义任务, 格式样例[{func: sass, opts: {logger: true}}, {func: task, opts: null }]
92 server: true,
93 buildTarget: 'default'
94 },
95
96 destMod: destMod,
97
98 rdMod: rdMod,
99
100 qaMod: qaMod,
101
102 birdConfig: {
103 basePath: "./dev",
104 targetServer: {
105 port: "8276",
106 host: "your server host",
107            headers: {
108              cookie: ""
109 }
110        },
111 ajaxOnly: false,
112 toolsConf: {
113 weinre: {
114 open: false, //和移动调试工具条中的vconsole冲突, 当为true时vconsole自动关闭
115 port: 9001
116 },
117
118 showTools: true //移动端调试工具条,PC端开发可关闭
119 }
120 },
121
122 serverConfig: {
123 root: './dev'
124 }
125}
126
127/*
128 * buildTarget用于设置dist后的目录结构,如果选择default,则默认为css, js, html
129 * 如果是一个对象,则表示自定义,不过目前只支持按照文件类型进行分类。
130 */
131
132