1 | const path = require('path');
|
2 | let userConfig = {};
|
3 | try {
|
4 | const pkg = require(path.join(process.cwd(), 'package.json'));
|
5 | userConfig = pkg.nanachi || pkg.mpreact || userConfig;
|
6 | } catch (err) {
|
7 |
|
8 | }
|
9 | const buildDir = userConfig.buildDir || 'dist';
|
10 | const sourceDir = userConfig.sourceDir || 'source';
|
11 | module.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,
|
71 | sourceDir: sourceDir,
|
72 | huawei: false,
|
73 | patchComponents: {},
|
74 | pluginTags: {},
|
75 | plugins: {}
|
76 | };
|