UNPKG

2.02 kBJavaScriptView Raw
1const path = require('path');
2let userConfig = {};
3try {
4 const pkg = require(path.join(process.cwd(), 'package.json'));
5 userConfig = pkg.nanachi || pkg.mpreact || userConfig;
6} catch (err) {
7 // eslint-disable-next-line
8}
9const buildDir = userConfig.buildDir || 'dist';
10const sourceDir = userConfig.sourceDir || 'source';
11module.exports = {
12 wx: {
13 libName: 'ReactWX',
14 styleExt: 'wxss',
15 xmlExt: 'wxml',
16 helpers: 'wxHelpers',
17 patchComponents: {},
18 disabledTitleBarPages: new Set()
19 },
20 qq: {
21 libName: 'ReactWX',
22 styleExt: 'qss',
23 xmlExt: 'qml',
24 helpers: 'qqHelpers',
25 patchComponents: {},
26 disabledTitleBarPages: new Set()
27 },
28 ali: {
29 libName: 'ReactAli',
30 styleExt: 'acss',
31 xmlExt: 'axml',
32 helpers: 'aliHelpers',
33 patchComponents: {},
34 disabledTitleBarPages: new Set()
35 },
36 bu: {
37 libName: 'ReactBu',
38 styleExt: 'css',
39 xmlExt: 'swan',
40 helpers: 'buHelpers',
41 patchComponents: {},
42 disabledTitleBarPages: new Set()
43 },
44 quick: {
45 libName: 'ReactWX',
46 jsExt: 'ux',
47 helpers: 'quickHelpers',
48
49 patchComponents: {
50 radio: 1,
51 'radio-group': 1,
52 checkbox: 1,
53 'checkbox-group':1,
54 label: 1,
55 navigator: 1,
56 picker: 1
57 },
58 disabledTitleBarPages:new Set()
59 },
60 tt: {
61 libName: 'ReactWX',
62 jsExt: 'js',
63 styleExt: 'ttss',
64 xmlExt: 'ttml',
65 helpers: 'ttHelpers',
66 patchComponents: {},
67 disabledTitleBarPages: new Set()
68 },
69 buildType: 'wx', //构建类型默认微信小程序
70 buildDir: buildDir, //非快应用项目默认构建目录为dist
71 sourceDir: sourceDir, //默认生成的源码目录
72 huawei: false,
73 patchComponents: {}, // 项目中使用的补丁组件
74 pluginTags: {},
75 plugins: {}
76};