@tarojs/helper 3.5.0-canary.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/babelRegister.d.ts +11 -0
- package/dist/babelRegister.js +25 -1
- package/dist/babelRegister.js.map +1 -0
- package/{types → dist}/constants.d.ts +44 -29
- package/dist/constants.js +48 -26
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +44 -17
- package/dist/index.js.map +1 -0
- package/{types → dist}/npm.d.ts +1 -1
- package/dist/npm.js +31 -6
- package/dist/npm.js.map +1 -0
- package/dist/swcRegister.d.ts +12 -0
- package/dist/swcRegister.js +39 -0
- package/dist/swcRegister.js.map +1 -0
- package/dist/terminal.d.ts +12 -0
- package/dist/terminal.js +23 -0
- package/dist/terminal.js.map +1 -0
- package/{types → dist}/utils.d.ts +13 -13
- package/dist/utils.js +64 -37
- package/dist/utils.js.map +1 -0
- package/index.js +2 -1
- package/package.json +16 -15
- package/types/babelRegister.d.ts +0 -6
- package/types/index.d.ts +0 -149
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PluginItem } from '@babel/core';
|
|
2
|
+
/**
|
|
3
|
+
* Inject `defineAppConfig` and `definePageConfig`
|
|
4
|
+
* require header at the top of a config file,
|
|
5
|
+
* without the need to specifically require them
|
|
6
|
+
* if they are used
|
|
7
|
+
*/
|
|
8
|
+
export declare function injectDefineConfigHeader(babel: any): PluginItem;
|
|
9
|
+
export default function createBabelRegister({ only }: {
|
|
10
|
+
only: any;
|
|
11
|
+
}): void;
|
package/dist/babelRegister.js
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.injectDefineConfigHeader = void 0;
|
|
4
|
-
const path = require("path");
|
|
27
|
+
const path = __importStar(require("path"));
|
|
5
28
|
/**
|
|
6
29
|
* Inject `defineAppConfig` and `definePageConfig`
|
|
7
30
|
* require header at the top of a config file,
|
|
@@ -66,3 +89,4 @@ function createBabelRegister({ only }) {
|
|
|
66
89
|
});
|
|
67
90
|
}
|
|
68
91
|
exports.default = createBabelRegister;
|
|
92
|
+
//# sourceMappingURL=babelRegister.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babelRegister.js","sourceRoot":"","sources":["../src/babelRegister.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA4B;AAE5B;;;;;EAKE;AACF,SAAgB,wBAAwB,CAAE,KAAU;IAClD,MAAM,SAAS,GAAG,oDAAoD,CAAA;IACtE,MAAM,UAAU,GAAG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D,OAAO,EAAE;YACP,wBAAwB;YACxB,CAAC,OAAO,CAAC,OAAO,CAAC,mCAAmC,CAAC,EAAE;oBACrD,MAAM,EAAE,IAAI;iBACb,CAAC;YACF,OAAO,CAAC,OAAO,CAAC,2CAA2C,CAAC;YAC5D,CAAC,OAAO,CAAC,OAAO,CAAC,iCAAiC,CAAC,EAAE;oBACnD,MAAM,EAAE,KAAK;oBACb,OAAO,EAAE,IAAI;oBACb,WAAW,EAAE,IAAI;oBACjB,YAAY,EAAE,KAAK;oBACnB,OAAO,EAAE,QAAQ;oBACjB,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,6BAA6B,CAAC;iBAC9E,CAAC;SACH;QACD,UAAU,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC;QAC1C,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,KAAK;KACb,CAAC,CAAA;AACJ,CAAC;AA3BD,sCA2BC"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const PLATFORMS:
|
|
1
|
+
import { chalk } from './terminal';
|
|
2
|
+
export declare const PLATFORMS: any;
|
|
3
3
|
export declare const enum processTypeEnum {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
START = "start",
|
|
5
|
+
CREATE = "create",
|
|
6
|
+
COMPILE = "compile",
|
|
7
|
+
CONVERT = "convert",
|
|
8
|
+
COPY = "copy",
|
|
9
|
+
GENERATE = "generate",
|
|
10
|
+
MODIFY = "modify",
|
|
11
|
+
ERROR = "error",
|
|
12
|
+
WARNING = "warning",
|
|
13
|
+
UNLINK = "unlink",
|
|
14
|
+
REFERENCE = "reference",
|
|
15
|
+
REMIND = "remind"
|
|
16
16
|
}
|
|
17
17
|
export interface IProcessTypeMap {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
[key: string]: {
|
|
19
|
+
name: string;
|
|
20
|
+
color: string | chalk.Chalk;
|
|
21
|
+
};
|
|
22
22
|
}
|
|
23
23
|
export declare const processTypeMap: IProcessTypeMap;
|
|
24
24
|
export declare const CSS_EXT: string[];
|
|
@@ -53,18 +53,27 @@ export declare const NODE_MODULES = "node_modules";
|
|
|
53
53
|
export declare const NODE_MODULES_REG: RegExp;
|
|
54
54
|
export declare const PROJECT_CONFIG = "config/index";
|
|
55
55
|
export declare const DEVICE_RATIO: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
640: number;
|
|
57
|
+
750: number;
|
|
58
|
+
828: number;
|
|
59
59
|
};
|
|
60
60
|
export declare const FILE_PROCESSOR_MAP: {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
'.js': string;
|
|
62
|
+
'.scss': string;
|
|
63
|
+
'.sass': string;
|
|
64
|
+
'.less': string;
|
|
65
|
+
'.styl': string;
|
|
66
66
|
};
|
|
67
67
|
export declare const UPDATE_PACKAGE_LIST: string[];
|
|
68
|
+
export declare enum META_TYPE {
|
|
69
|
+
ENTRY = "ENTRY",
|
|
70
|
+
PAGE = "PAGE",
|
|
71
|
+
COMPONENT = "COMPONENT",
|
|
72
|
+
NORMAL = "NORMAL",
|
|
73
|
+
STATIC = "STATIC",
|
|
74
|
+
CONFIG = "CONFIG",
|
|
75
|
+
EXPORTS = "EXPORTS"
|
|
76
|
+
}
|
|
68
77
|
export declare const taroJsComponents = "@tarojs/components";
|
|
69
78
|
export declare const taroJsQuickAppComponents = "@tarojs/components-qa";
|
|
70
79
|
export declare const taroJsFramework = "@tarojs/taro";
|
|
@@ -73,12 +82,18 @@ export declare const taroJsMobx = "@tarojs/mobx";
|
|
|
73
82
|
export declare const taroJsMobxCommon = "@tarojs/mobx-common";
|
|
74
83
|
export declare const DEVICE_RATIO_NAME = "deviceRatio";
|
|
75
84
|
export declare const isWindows: boolean;
|
|
76
|
-
export declare const DEFAULT_TEMPLATE_SRC = "github:NervJS/taro-project-templates#v3.
|
|
77
|
-
export declare const DEFAULT_TEMPLATE_SRC_GITEE = "direct:https://gitee.com/o2team/taro-project-templates.git#v3.
|
|
78
|
-
export declare const
|
|
85
|
+
export declare const DEFAULT_TEMPLATE_SRC = "github:NervJS/taro-project-templates#v3.5";
|
|
86
|
+
export declare const DEFAULT_TEMPLATE_SRC_GITEE = "direct:https://gitee.com/o2team/taro-project-templates.git#v3.5";
|
|
87
|
+
export declare const TARO_CONFIG_FOLDER = ".taro3.5";
|
|
79
88
|
export declare const TARO_BASE_CONFIG = "index.json";
|
|
80
89
|
export declare const OUTPUT_DIR = "dist";
|
|
81
90
|
export declare const SOURCE_DIR = "src";
|
|
82
91
|
export declare const TEMP_DIR = ".temp";
|
|
83
92
|
export declare const NPM_DIR = "npm";
|
|
84
93
|
export declare const ENTRY = "app";
|
|
94
|
+
export declare enum FRAMEWORK_MAP {
|
|
95
|
+
VUE = "vue",
|
|
96
|
+
VUE3 = "vue3",
|
|
97
|
+
REACT = "react",
|
|
98
|
+
NERV = "nerv"
|
|
99
|
+
}
|
package/dist/constants.js
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TARO_BASE_CONFIG = exports.
|
|
4
|
-
exports.
|
|
5
|
-
const os = require("os");
|
|
6
|
-
const
|
|
26
|
+
exports.TARO_BASE_CONFIG = exports.TARO_CONFIG_FOLDER = exports.DEFAULT_TEMPLATE_SRC_GITEE = exports.DEFAULT_TEMPLATE_SRC = exports.isWindows = exports.DEVICE_RATIO_NAME = exports.taroJsMobxCommon = exports.taroJsMobx = exports.taroJsRedux = exports.taroJsFramework = exports.taroJsQuickAppComponents = exports.taroJsComponents = exports.META_TYPE = exports.UPDATE_PACKAGE_LIST = exports.FILE_PROCESSOR_MAP = exports.DEVICE_RATIO = exports.PROJECT_CONFIG = exports.NODE_MODULES_REG = exports.NODE_MODULES = exports.CSS_IMPORT_REG = exports.REG_URL = exports.REG_WXML_IMPORT = exports.REG_TEMPLATE = exports.REG_UX = exports.REG_JSON = exports.REG_FONT = exports.REG_IMAGE = exports.REG_MEDIA = exports.REG_CSS = exports.REG_STYLE = exports.REG_STYLUS = exports.REG_LESS = exports.REG_SASS_SCSS = exports.REG_SASS_SASS = exports.REG_SASS = exports.REG_VUE = exports.REG_SCRIPTS = exports.REG_TYPESCRIPT = exports.REG_SCRIPT = exports.REG_JS = exports.VUE_EXT = exports.SCRIPT_EXT = exports.UX_EXT = exports.TS_EXT = exports.JS_EXT = exports.SCSS_EXT = exports.CSS_EXT = exports.processTypeMap = exports.processTypeEnum = exports.PLATFORMS = void 0;
|
|
27
|
+
exports.FRAMEWORK_MAP = exports.ENTRY = exports.NPM_DIR = exports.TEMP_DIR = exports.SOURCE_DIR = exports.OUTPUT_DIR = void 0;
|
|
28
|
+
const os = __importStar(require("os"));
|
|
29
|
+
const terminal_1 = require("./terminal");
|
|
7
30
|
// eslint-disable-next-line dot-notation
|
|
8
31
|
exports.PLATFORMS = global['PLATFORMS'] = global['PLATFORMS'] || {};
|
|
9
32
|
var processTypeEnum;
|
|
@@ -22,51 +45,51 @@ var processTypeEnum;
|
|
|
22
45
|
processTypeEnum["REMIND"] = "remind";
|
|
23
46
|
})(processTypeEnum = exports.processTypeEnum || (exports.processTypeEnum = {}));
|
|
24
47
|
exports.processTypeMap = {
|
|
25
|
-
["create" /* CREATE */]: {
|
|
48
|
+
["create" /* processTypeEnum.CREATE */]: {
|
|
26
49
|
name: '创建',
|
|
27
50
|
color: 'cyan'
|
|
28
51
|
},
|
|
29
|
-
["compile" /* COMPILE */]: {
|
|
52
|
+
["compile" /* processTypeEnum.COMPILE */]: {
|
|
30
53
|
name: '编译',
|
|
31
54
|
color: 'green'
|
|
32
55
|
},
|
|
33
|
-
["convert" /* CONVERT */]: {
|
|
56
|
+
["convert" /* processTypeEnum.CONVERT */]: {
|
|
34
57
|
name: '转换',
|
|
35
|
-
color: chalk.rgb(255, 136, 0)
|
|
58
|
+
color: terminal_1.chalk.rgb(255, 136, 0)
|
|
36
59
|
},
|
|
37
|
-
["copy" /* COPY */]: {
|
|
60
|
+
["copy" /* processTypeEnum.COPY */]: {
|
|
38
61
|
name: '拷贝',
|
|
39
62
|
color: 'magenta'
|
|
40
63
|
},
|
|
41
|
-
["generate" /* GENERATE */]: {
|
|
64
|
+
["generate" /* processTypeEnum.GENERATE */]: {
|
|
42
65
|
name: '生成',
|
|
43
66
|
color: 'blue'
|
|
44
67
|
},
|
|
45
|
-
["modify" /* MODIFY */]: {
|
|
68
|
+
["modify" /* processTypeEnum.MODIFY */]: {
|
|
46
69
|
name: '修改',
|
|
47
70
|
color: 'yellow'
|
|
48
71
|
},
|
|
49
|
-
["error" /* ERROR */]: {
|
|
72
|
+
["error" /* processTypeEnum.ERROR */]: {
|
|
50
73
|
name: '错误',
|
|
51
74
|
color: 'red'
|
|
52
75
|
},
|
|
53
|
-
["warning" /* WARNING */]: {
|
|
76
|
+
["warning" /* processTypeEnum.WARNING */]: {
|
|
54
77
|
name: '警告',
|
|
55
78
|
color: 'yellowBright'
|
|
56
79
|
},
|
|
57
|
-
["unlink" /* UNLINK */]: {
|
|
80
|
+
["unlink" /* processTypeEnum.UNLINK */]: {
|
|
58
81
|
name: '删除',
|
|
59
82
|
color: 'magenta'
|
|
60
83
|
},
|
|
61
|
-
["start" /* START */]: {
|
|
84
|
+
["start" /* processTypeEnum.START */]: {
|
|
62
85
|
name: '启动',
|
|
63
86
|
color: 'green'
|
|
64
87
|
},
|
|
65
|
-
["reference" /* REFERENCE */]: {
|
|
88
|
+
["reference" /* processTypeEnum.REFERENCE */]: {
|
|
66
89
|
name: '引用',
|
|
67
90
|
color: 'blue'
|
|
68
91
|
},
|
|
69
|
-
["remind" /* REMIND */]: {
|
|
92
|
+
["remind" /* processTypeEnum.REMIND */]: {
|
|
70
93
|
name: '提示',
|
|
71
94
|
color: 'green'
|
|
72
95
|
}
|
|
@@ -126,10 +149,13 @@ exports.UPDATE_PACKAGE_LIST = [
|
|
|
126
149
|
'@tarojs/cli',
|
|
127
150
|
'@tarojs/components',
|
|
128
151
|
'@tarojs/taro-h5',
|
|
152
|
+
'@tarojs/taro-rn',
|
|
153
|
+
'@tarojs/rn-runner',
|
|
129
154
|
'@tarojs/helper',
|
|
130
155
|
'@tarojs/taro-loader',
|
|
131
156
|
'@tarojs/mini-runner',
|
|
132
157
|
'@tarojs/react',
|
|
158
|
+
'@tarojs/plugin-framework-react',
|
|
133
159
|
'@tarojs/router',
|
|
134
160
|
'@tarojs/runner-utils',
|
|
135
161
|
'@tarojs/runtime',
|
|
@@ -143,6 +169,7 @@ exports.UPDATE_PACKAGE_LIST = [
|
|
|
143
169
|
'@tarojs/plugin-platform-tt',
|
|
144
170
|
'@tarojs/plugin-platform-qq',
|
|
145
171
|
'@tarojs/plugin-platform-jd',
|
|
172
|
+
'@tarojs/plugin-html',
|
|
146
173
|
'nervjs',
|
|
147
174
|
'nerv-devtools'
|
|
148
175
|
];
|
|
@@ -164,9 +191,9 @@ exports.taroJsMobx = '@tarojs/mobx';
|
|
|
164
191
|
exports.taroJsMobxCommon = '@tarojs/mobx-common';
|
|
165
192
|
exports.DEVICE_RATIO_NAME = 'deviceRatio';
|
|
166
193
|
exports.isWindows = os.platform() === 'win32';
|
|
167
|
-
exports.DEFAULT_TEMPLATE_SRC = 'github:NervJS/taro-project-templates#v3.
|
|
168
|
-
exports.DEFAULT_TEMPLATE_SRC_GITEE = 'direct:https://gitee.com/o2team/taro-project-templates.git#v3.
|
|
169
|
-
exports.
|
|
194
|
+
exports.DEFAULT_TEMPLATE_SRC = 'github:NervJS/taro-project-templates#v3.5';
|
|
195
|
+
exports.DEFAULT_TEMPLATE_SRC_GITEE = 'direct:https://gitee.com/o2team/taro-project-templates.git#v3.5';
|
|
196
|
+
exports.TARO_CONFIG_FOLDER = '.taro3.5';
|
|
170
197
|
exports.TARO_BASE_CONFIG = 'index.json';
|
|
171
198
|
exports.OUTPUT_DIR = 'dist';
|
|
172
199
|
exports.SOURCE_DIR = 'src';
|
|
@@ -180,9 +207,4 @@ var FRAMEWORK_MAP;
|
|
|
180
207
|
FRAMEWORK_MAP["REACT"] = "react";
|
|
181
208
|
FRAMEWORK_MAP["NERV"] = "nerv";
|
|
182
209
|
})(FRAMEWORK_MAP = exports.FRAMEWORK_MAP || (exports.FRAMEWORK_MAP = {}));
|
|
183
|
-
|
|
184
|
-
vue: exports.VUE_EXT,
|
|
185
|
-
vue3: exports.VUE_EXT,
|
|
186
|
-
react: exports.SCRIPT_EXT,
|
|
187
|
-
nerv: exports.SCRIPT_EXT
|
|
188
|
-
};
|
|
210
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AAExB,yCAAkC;AAElC,wCAAwC;AAC3B,QAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;AAExE,IAAkB,eAajB;AAbD,WAAkB,eAAe;IAC/B,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,gCAAa,CAAA;IACb,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,oCAAiB,CAAA;IACjB,0CAAuB,CAAA;IACvB,oCAAiB,CAAA;AACnB,CAAC,EAbiB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAahC;AASY,QAAA,cAAc,GAAoB;IAC7C,uCAAwB,EAAE;QACxB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,MAAM;KACd;IACD,yCAAyB,EAAE;QACzB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,OAAO;KACf;IACD,yCAAyB,EAAE;QACzB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,gBAAK,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;KAC9B;IACD,mCAAsB,EAAE;QACtB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,SAAS;KACjB;IACD,2CAA0B,EAAE;QAC1B,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,MAAM;KACd;IACD,uCAAwB,EAAE;QACxB,IAA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AACf,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * as chokidar from 'chokidar';
|
|
2
|
+
export * as fs from 'fs-extra';
|
|
3
|
+
export declare const createDebug: (id: string) => any;
|
|
4
|
+
export { default as createBabelRegister, injectDefineConfigHeader } from './babelRegister';
|
|
5
|
+
export * from './constants';
|
|
6
|
+
export * as npm from './npm';
|
|
7
|
+
export { default as createSwcRegister } from './swcRegister';
|
|
8
|
+
export * from './terminal';
|
|
9
|
+
export * from './utils';
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,46 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
2
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
createDebug: debug_1.default });
|
|
19
|
-
exports.default = exports.helper;
|
|
32
|
+
exports.createSwcRegister = exports.npm = exports.injectDefineConfigHeader = exports.createBabelRegister = exports.createDebug = exports.fs = exports.chokidar = void 0;
|
|
33
|
+
exports.chokidar = __importStar(require("chokidar"));
|
|
34
|
+
exports.fs = __importStar(require("fs-extra"));
|
|
35
|
+
const createDebug = (id) => require('debug')(id);
|
|
36
|
+
exports.createDebug = createDebug;
|
|
37
|
+
var babelRegister_1 = require("./babelRegister");
|
|
38
|
+
Object.defineProperty(exports, "createBabelRegister", { enumerable: true, get: function () { return __importDefault(babelRegister_1).default; } });
|
|
39
|
+
Object.defineProperty(exports, "injectDefineConfigHeader", { enumerable: true, get: function () { return babelRegister_1.injectDefineConfigHeader; } });
|
|
40
|
+
__exportStar(require("./constants"), exports);
|
|
41
|
+
exports.npm = __importStar(require("./npm"));
|
|
42
|
+
var swcRegister_1 = require("./swcRegister");
|
|
43
|
+
Object.defineProperty(exports, "createSwcRegister", { enumerable: true, get: function () { return __importDefault(swcRegister_1).default; } });
|
|
44
|
+
__exportStar(require("./terminal"), exports);
|
|
45
|
+
__exportStar(require("./utils"), exports);
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAoC;AACpC,+CAA8B;AAEvB,MAAM,WAAW,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAA;AAAlD,QAAA,WAAW,eAAuC;AAE/D,iDAA0F;AAAjF,qIAAA,OAAO,OAAuB;AAAE,yHAAA,wBAAwB,OAAA;AACjE,8CAA2B;AAC3B,6CAA4B;AAC5B,6CAA4D;AAAnD,iIAAA,OAAO,OAAqB;AACrC,6CAA0B;AAC1B,0CAAuB"}
|
package/{types → dist}/npm.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare type pluginFunction = (pluginName: string, content: string | null, file: string, config:
|
|
1
|
+
declare type pluginFunction = (pluginName: string, content: string | null, file: string, config: Record<string, any>, root: string) => any;
|
|
2
2
|
export interface IInstallOptions {
|
|
3
3
|
dev: boolean;
|
|
4
4
|
peerDependencies?: boolean;
|
package/dist/npm.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -10,10 +33,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
35
|
exports.getNpmPkg = exports.getNpmPkgSync = exports.callPluginSync = exports.callPlugin = exports.installNpmPkg = exports.resolveNpmSync = exports.resolveNpm = exports.taroPluginPrefix = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const chalk = require("chalk");
|
|
16
|
-
const Util = require("./utils");
|
|
36
|
+
const terminal_1 = require("./terminal");
|
|
37
|
+
const Util = __importStar(require("./utils"));
|
|
17
38
|
const PEERS = /UNMET PEER DEPENDENCY ([a-z\-0-9.]+)@(.+)/gm;
|
|
18
39
|
const npmCached = {};
|
|
19
40
|
const erroneous = [];
|
|
@@ -23,6 +44,7 @@ const defaultInstallOptions = {
|
|
|
23
44
|
};
|
|
24
45
|
exports.taroPluginPrefix = '@tarojs/plugin-';
|
|
25
46
|
function resolveNpm(pluginName, root) {
|
|
47
|
+
const resolvePath = require('resolve');
|
|
26
48
|
if (!npmCached[pluginName]) {
|
|
27
49
|
return new Promise((resolve, reject) => {
|
|
28
50
|
resolvePath(`${pluginName}`, { basedir: root }, (err, res) => {
|
|
@@ -38,6 +60,7 @@ function resolveNpm(pluginName, root) {
|
|
|
38
60
|
}
|
|
39
61
|
exports.resolveNpm = resolveNpm;
|
|
40
62
|
function resolveNpmSync(pluginName, root) {
|
|
63
|
+
const resolvePath = require('resolve');
|
|
41
64
|
try {
|
|
42
65
|
if (!npmCached[pluginName]) {
|
|
43
66
|
const res = resolvePath.sync(pluginName, { basedir: root });
|
|
@@ -47,7 +70,7 @@ function resolveNpmSync(pluginName, root) {
|
|
|
47
70
|
}
|
|
48
71
|
catch (err) {
|
|
49
72
|
if (err.code === 'MODULE_NOT_FOUND') {
|
|
50
|
-
console.log(chalk.cyan(`缺少npm包${pluginName},开始安装...`));
|
|
73
|
+
console.log(terminal_1.chalk.cyan(`缺少npm包${pluginName},开始安装...`));
|
|
51
74
|
const installOptions = {
|
|
52
75
|
dev: false
|
|
53
76
|
};
|
|
@@ -103,6 +126,7 @@ function installNpmPkg(pkgList, options) {
|
|
|
103
126
|
args.push('--save');
|
|
104
127
|
}
|
|
105
128
|
}
|
|
129
|
+
const spawn = require('cross-spawn');
|
|
106
130
|
const output = spawn.sync(installer, args, {
|
|
107
131
|
stdio: ['ignore', 'pipe', 'inherit']
|
|
108
132
|
});
|
|
@@ -154,7 +178,7 @@ function getNpmPkg(npmName, root) {
|
|
|
154
178
|
}
|
|
155
179
|
catch (err) {
|
|
156
180
|
if (err.code === 'MODULE_NOT_FOUND') {
|
|
157
|
-
console.log(chalk.cyan(`缺少npm包${npmName},开始安装...`));
|
|
181
|
+
console.log(terminal_1.chalk.cyan(`缺少npm包${npmName},开始安装...`));
|
|
158
182
|
const installOptions = {
|
|
159
183
|
dev: false
|
|
160
184
|
};
|
|
@@ -170,3 +194,4 @@ function getNpmPkg(npmName, root) {
|
|
|
170
194
|
});
|
|
171
195
|
}
|
|
172
196
|
exports.getNpmPkg = getNpmPkg;
|
|
197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,OAAO,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;AACxC,CAAC,CAAA;AAHY,QAAA,cAAc,kBAG1B;AAED,SAAgB,aAAa,CAAE,OAAe,EAAE,IAAY;IAC1D,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAC9B,OAAO,KAAK,CAAA;AACd,CAAC;AAJD,sCAIC;AAED,SAAsB,SAAS,CAAE,OAAe,EAAE,IAAY;;QAC5D,IAAI,OAAO,CAAA;QACX,IAAI;YACF,OAAO,GAAG,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;SACxC;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,CAAC,IAAI,KAAK,kBAAkB,EAAE;gBACnC,OAAO,CAAC,GAAG,CAAC,gBAAK,CAAC,IAAI,CAAC,SAAS,OAAO,UAAU,CAAC,CAAC,CAAA;gBACnD,MAAM,cAAc,GAAoB;oBACtC,GAAG,EAAE,KAAK;iBACX,CAAA;gBACD,IAAI,OAAO,CAAC,OAAO,CAAC,wBAAgB,CAAC,IAAI,CAAC,EAAE;oBAC1C,cAAc,CAAC,GAAG,GAAG,IAAI,CAAA;iBAC1B;gBACD,aAAa,CAAC,OAAO,EAAE,cAAc,CAAC,CAAA;gBACtC,OAAO,GAAG,MAAM,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;aAC1C;SACF;QACD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;QAC9B,OAAO,KAAK,CAAA;IACd,CAAC;CAAA;AAnBD,8BAmBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CallExpression } from '@swc/core';
|
|
2
|
+
import { Visitor } from '@swc/core/Visitor.js';
|
|
3
|
+
export declare class InjectDefineConfigHeader extends Visitor {
|
|
4
|
+
visitTsType(expression: any): any;
|
|
5
|
+
visitCallExpression(expression: CallExpression): import("@swc/core").Expression;
|
|
6
|
+
}
|
|
7
|
+
interface ICreateSwcRegisterParam {
|
|
8
|
+
only: any;
|
|
9
|
+
plugin?: any;
|
|
10
|
+
}
|
|
11
|
+
export default function createSwcRegister({ only, plugin }: ICreateSwcRegisterParam): void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InjectDefineConfigHeader = void 0;
|
|
4
|
+
const Visitor_js_1 = require("@swc/core/Visitor.js");
|
|
5
|
+
class InjectDefineConfigHeader extends Visitor_js_1.Visitor {
|
|
6
|
+
visitTsType(expression) {
|
|
7
|
+
return expression;
|
|
8
|
+
}
|
|
9
|
+
visitCallExpression(expression) {
|
|
10
|
+
const callee = expression.callee;
|
|
11
|
+
if (callee.type === 'Identifier' && (callee.value === 'definePageConfig' || callee.value === 'defineAppConfig')) {
|
|
12
|
+
return expression.arguments[0].expression;
|
|
13
|
+
}
|
|
14
|
+
return expression;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.InjectDefineConfigHeader = InjectDefineConfigHeader;
|
|
18
|
+
function createSwcRegister({ only, plugin }) {
|
|
19
|
+
const config = {
|
|
20
|
+
only: Array.from(new Set([...only])),
|
|
21
|
+
jsc: {
|
|
22
|
+
parser: {
|
|
23
|
+
syntax: 'typescript',
|
|
24
|
+
decorators: true
|
|
25
|
+
},
|
|
26
|
+
transform: {
|
|
27
|
+
legacyDecorator: true
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
module: {
|
|
31
|
+
type: 'commonjs'
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
if (plugin)
|
|
35
|
+
config.plugin = plugin;
|
|
36
|
+
require('@swc/register')(config);
|
|
37
|
+
}
|
|
38
|
+
exports.default = createSwcRegister;
|
|
39
|
+
//# sourceMappingURL=swcRegister.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swcRegister.js","sourceRoot":"","sources":["../src/swcRegister.ts"],"names":[],"mappings":";;;AACA,qDAA8C;AAE9C,MAAa,wBAAyB,SAAQ,oBAAO;IACnD,WAAW,CAAE,UAAU;QACrB,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,mBAAmB,CAAE,UAA0B;QAC7C,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAA;QAChC,IAAI,MAAM,CAAC,IAAI,KAAK,YAAY,IAAI,CAAC,MAAM,CAAC,KAAK,KAAK,kBAAkB,IAAI,MAAM,CAAC,KAAK,KAAK,iBAAiB,CAAC,EAAE;YAC/G,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAA;SAC1C;QAED,OAAO,UAAU,CAAA;IACnB,CAAC;CACF;AAbD,4DAaC;AAOD,SAAwB,iBAAiB,CAAE,EAAE,IAAI,EAAE,MAAM,EAA2B;IAClF,MAAM,MAAM,GAAwB;QAClC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACpC,GAAG,EAAE;YACH,MAAM,EAAE;gBACN,MAAM,EAAE,YAAY;gBACpB,UAAU,EAAE,IAAI;aACjB;YACD,SAAS,EAAE;gBACT,eAAe,EAAE,IAAI;aACtB;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,UAAU;SACjB;KACF,CAAA;IAED,IAAI,MAAM;QAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAA;IAElC,OAAO,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAClC,CAAC;AApBD,oCAoBC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
interface ITerminalLinkOptions {
|
|
3
|
+
target?: 'stdout' | 'stderr';
|
|
4
|
+
fallback?: boolean | ((text: string, url: string) => string);
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
declare function terminalLink(text: string, url: string, { target, fallback }?: ITerminalLinkOptions): string;
|
|
8
|
+
declare namespace terminalLink {
|
|
9
|
+
var isSupported: any;
|
|
10
|
+
var stderr: typeof terminalLink;
|
|
11
|
+
}
|
|
12
|
+
export { chalk, terminalLink };
|
package/dist/terminal.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.terminalLink = exports.chalk = void 0;
|
|
7
|
+
const ansi_escapes_1 = __importDefault(require("ansi-escapes"));
|
|
8
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
+
exports.chalk = chalk_1.default;
|
|
10
|
+
const supports_hyperlinks_1 = __importDefault(require("supports-hyperlinks"));
|
|
11
|
+
function terminalLink(text, url, { target = 'stdout', fallback } = {}) {
|
|
12
|
+
if (!supports_hyperlinks_1.default[target]) {
|
|
13
|
+
if (fallback === false)
|
|
14
|
+
return text;
|
|
15
|
+
return typeof fallback === 'function' ? fallback(text, url) : `${text} (\u200B${url}\u200B)`;
|
|
16
|
+
}
|
|
17
|
+
return ansi_escapes_1.default.link(text, url);
|
|
18
|
+
}
|
|
19
|
+
exports.terminalLink = terminalLink;
|
|
20
|
+
terminalLink.isSupported = supports_hyperlinks_1.default.stdout;
|
|
21
|
+
terminalLink.stderr = ((text, url, options = {}) => terminalLink(text, url, Object.assign({ target: 'stderr' }, options)));
|
|
22
|
+
terminalLink.stderr.isSupported = supports_hyperlinks_1.default.stderr;
|
|
23
|
+
//# sourceMappingURL=terminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal.js","sourceRoot":"","sources":["../src/terminal.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAsC;AACtC,kDAAyB;AAuBhB,gBAvBF,eAAK,CAuBE;AAtBd,8EAAoD;AAQpD,SAAS,YAAY,CAAE,IAAY,EAAE,GAAW,EAAE,EAAE,MAAM,GAAG,QAAQ,EAAE,QAAQ,KAA2B,EAAE;IAC1G,IAAI,CAAC,6BAAkB,CAAC,MAAM,CAAC,EAAE;QAC/B,IAAI,QAAQ,KAAK,KAAK;YAAE,OAAO,IAAI,CAAA;QAEnC,OAAO,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,WAAW,GAAG,SAAS,CAAA;KAC7F;IAED,OAAO,sBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AACpC,CAAC;AAMe,oCAAY;AAJ5B,YAAY,CAAC,WAAW,GAAG,6BAAkB,CAAC,MAAM,CAAA;AACpD,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,IAAY,EAAE,GAAW,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,kBAAI,MAAM,EAAE,QAAQ,IAAK,OAAO,EAAG,CAAwB,CAAA;AACrJ,YAAY,CAAC,MAAM,CAAC,WAAW,GAAG,6BAAkB,CAAC,MAAM,CAAA"}
|
|
@@ -3,22 +3,23 @@ export declare function normalizePath(path: string): string;
|
|
|
3
3
|
export declare const isNodeModule: (filename: string) => boolean;
|
|
4
4
|
export declare function isNpmPkg(name: string): boolean;
|
|
5
5
|
export declare function isQuickAppPkg(name: string): boolean;
|
|
6
|
-
export declare function isAliasPath(name: string, pathAlias?:
|
|
7
|
-
export declare function replaceAliasPath(filePath: string, name: string, pathAlias?:
|
|
6
|
+
export declare function isAliasPath(name: string, pathAlias?: Record<string, any>): boolean;
|
|
7
|
+
export declare function replaceAliasPath(filePath: string, name: string, pathAlias?: Record<string, any>): string;
|
|
8
8
|
export declare function promoteRelativePath(fPath: string): string;
|
|
9
9
|
export declare function resolveStylePath(p: string): string;
|
|
10
10
|
export declare function printLog(type: processTypeEnum, tag: string, filePath?: string): void;
|
|
11
|
-
export declare function recursiveFindNodeModules(filePath: string): string;
|
|
11
|
+
export declare function recursiveFindNodeModules(filePath: string, lastFindPath?: string): string;
|
|
12
12
|
export declare function getUserHomeDir(): string;
|
|
13
13
|
export declare function getTaroPath(): string;
|
|
14
|
-
export declare function getConfig():
|
|
14
|
+
export declare function getConfig(): Record<string, any>;
|
|
15
15
|
export declare function getSystemUsername(): string;
|
|
16
16
|
export declare function shouldUseYarn(): boolean;
|
|
17
17
|
export declare function shouldUseCnpm(): boolean;
|
|
18
18
|
export declare function isEmptyObject(obj: any): boolean;
|
|
19
|
+
export declare function resolveMainFilePath(p: string, extArrs?: string[]): string;
|
|
19
20
|
export declare function resolveScriptPath(p: string): string;
|
|
20
|
-
export declare function generateEnvList(env:
|
|
21
|
-
export declare function generateConstantsList(constants:
|
|
21
|
+
export declare function generateEnvList(env: Record<string, any>): Record<string, any>;
|
|
22
|
+
export declare function generateConstantsList(constants: Record<string, any>): Record<string, any>;
|
|
22
23
|
export declare function cssImports(content: string): string[];
|
|
23
24
|
export declare function emptyDirectory(dirPath: string, opts?: {
|
|
24
25
|
excludes: string[];
|
|
@@ -29,18 +30,17 @@ export declare function getInstalledNpmPkgVersion(pkgName: string, basedir: stri
|
|
|
29
30
|
export declare const recursiveMerge: <T = any>(src: Partial<T>, ...args: (Partial<T> | undefined)[]) => any;
|
|
30
31
|
export declare const mergeVisitors: (src: any, ...args: any[]) => any;
|
|
31
32
|
export declare const applyArrayedVisitors: (obj: any) => any;
|
|
32
|
-
export declare function unzip(zipPath: any): Promise<
|
|
33
|
-
export declare
|
|
34
|
-
export declare const getAllFilesInFloder: (floder: string, filter?: string[]) => Promise<string[]>;
|
|
33
|
+
export declare function unzip(zipPath: any): Promise<void>;
|
|
34
|
+
export declare const getAllFilesInFolder: (folder: string, filter?: string[]) => Promise<string[]>;
|
|
35
35
|
export interface FileStat {
|
|
36
36
|
name: string;
|
|
37
37
|
isDirectory: boolean;
|
|
38
38
|
isFile: boolean;
|
|
39
39
|
}
|
|
40
|
-
export declare function readDirWithFileTypes(
|
|
40
|
+
export declare function readDirWithFileTypes(folder: string): FileStat[];
|
|
41
41
|
export declare function extnameExpRegOf(filePath: string): RegExp;
|
|
42
42
|
export declare function addPlatforms(platform: string): void;
|
|
43
43
|
export declare const getModuleDefaultExport: (exports: any) => any;
|
|
44
|
-
export declare
|
|
45
|
-
export declare
|
|
46
|
-
export declare
|
|
44
|
+
export declare function removeHeadSlash(str: string): string;
|
|
45
|
+
export declare function readPageConfig(configPath: string): any;
|
|
46
|
+
export declare function readConfig(configPath: string): any;
|
package/dist/utils.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,20 +32,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
32
|
});
|
|
10
33
|
};
|
|
11
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.readConfig = exports.readPageConfig = exports.removeHeadSlash = exports.getModuleDefaultExport = exports.addPlatforms = exports.extnameExpRegOf = exports.readDirWithFileTypes = exports.
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const os = require("os");
|
|
16
|
-
const stream_1 = require("stream");
|
|
17
|
-
const child_process = require("child_process");
|
|
18
|
-
const parser = require("@babel/parser");
|
|
19
|
-
const traverse_1 = require("@babel/traverse");
|
|
20
|
-
const chalk = require("chalk");
|
|
21
|
-
const findWorkspaceRoot = require("find-yarn-workspace-root");
|
|
35
|
+
exports.readConfig = exports.readPageConfig = exports.removeHeadSlash = exports.getModuleDefaultExport = exports.addPlatforms = exports.extnameExpRegOf = exports.readDirWithFileTypes = exports.getAllFilesInFolder = exports.unzip = exports.applyArrayedVisitors = exports.mergeVisitors = exports.recursiveMerge = exports.getInstalledNpmPkgVersion = exports.getInstalledNpmPkgPath = exports.pascalCase = exports.emptyDirectory = exports.cssImports = exports.generateConstantsList = exports.generateEnvList = exports.resolveScriptPath = exports.resolveMainFilePath = exports.isEmptyObject = exports.shouldUseCnpm = exports.shouldUseYarn = exports.getSystemUsername = exports.getConfig = exports.getTaroPath = exports.getUserHomeDir = exports.recursiveFindNodeModules = exports.printLog = exports.resolveStylePath = exports.promoteRelativePath = exports.replaceAliasPath = exports.isAliasPath = exports.isQuickAppPkg = exports.isNpmPkg = exports.isNodeModule = exports.normalizePath = void 0;
|
|
36
|
+
const child_process = __importStar(require("child_process"));
|
|
37
|
+
const fs = __importStar(require("fs-extra"));
|
|
22
38
|
const lodash_1 = require("lodash");
|
|
23
|
-
const
|
|
39
|
+
const os = __importStar(require("os"));
|
|
40
|
+
const path = __importStar(require("path"));
|
|
24
41
|
const constants_1 = require("./constants");
|
|
25
|
-
const
|
|
42
|
+
const swcRegister_1 = __importStar(require("./swcRegister"));
|
|
43
|
+
const terminal_1 = require("./terminal");
|
|
26
44
|
const execSync = child_process.execSync;
|
|
27
45
|
function normalizePath(path) {
|
|
28
46
|
return path.replace(/\\/g, '/').replace(/\/{2,}/g, '/');
|
|
@@ -113,7 +131,7 @@ function printLog(type, tag, filePath) {
|
|
|
113
131
|
const padding = '';
|
|
114
132
|
filePath = filePath || '';
|
|
115
133
|
if (typeof typeShow.color === 'string') {
|
|
116
|
-
console.log(chalk[typeShow.color](typeShow.name), padding, tag, padding, filePath);
|
|
134
|
+
console.log(terminal_1.chalk[typeShow.color](typeShow.name), padding, tag, padding, filePath);
|
|
117
135
|
}
|
|
118
136
|
else {
|
|
119
137
|
console.log(typeShow.color(typeShow.name), padding, tag, padding, filePath);
|
|
@@ -121,6 +139,7 @@ function printLog(type, tag, filePath) {
|
|
|
121
139
|
}
|
|
122
140
|
exports.printLog = printLog;
|
|
123
141
|
function recursiveFindNodeModules(filePath, lastFindPath) {
|
|
142
|
+
const findWorkspaceRoot = require('find-yarn-workspace-root');
|
|
124
143
|
if (lastFindPath && (normalizePath(filePath) === normalizePath(lastFindPath))) {
|
|
125
144
|
return filePath;
|
|
126
145
|
}
|
|
@@ -131,7 +150,7 @@ function recursiveFindNodeModules(filePath, lastFindPath) {
|
|
|
131
150
|
return nodeModules;
|
|
132
151
|
}
|
|
133
152
|
if (dirname.split(path.sep).length <= 1) {
|
|
134
|
-
printLog("error" /* ERROR */, `在${dirname}目录下`, '未找到node_modules文件夹,请先安装相关依赖库!');
|
|
153
|
+
printLog("error" /* processTypeEnum.ERROR */, `在${dirname}目录下`, '未找到node_modules文件夹,请先安装相关依赖库!');
|
|
135
154
|
return nodeModules;
|
|
136
155
|
}
|
|
137
156
|
return recursiveFindNodeModules(dirname, filePath);
|
|
@@ -157,7 +176,7 @@ function getUserHomeDir() {
|
|
|
157
176
|
}
|
|
158
177
|
exports.getUserHomeDir = getUserHomeDir;
|
|
159
178
|
function getTaroPath() {
|
|
160
|
-
const taroPath = path.join(getUserHomeDir(), constants_1.
|
|
179
|
+
const taroPath = path.join(getUserHomeDir(), constants_1.TARO_CONFIG_FOLDER);
|
|
161
180
|
if (!fs.existsSync(taroPath)) {
|
|
162
181
|
fs.ensureDirSync(taroPath);
|
|
163
182
|
}
|
|
@@ -259,7 +278,7 @@ function generateConstantsList(constants) {
|
|
|
259
278
|
const res = {};
|
|
260
279
|
if (constants && !isEmptyObject(constants)) {
|
|
261
280
|
for (const key in constants) {
|
|
262
|
-
if (lodash_1.isPlainObject(constants[key])) {
|
|
281
|
+
if ((0, lodash_1.isPlainObject)(constants[key])) {
|
|
263
282
|
res[key] = generateConstantsList(constants[key]);
|
|
264
283
|
}
|
|
265
284
|
else {
|
|
@@ -319,7 +338,7 @@ function emptyDirectory(dirPath, opts = { excludes: [] }) {
|
|
|
319
338
|
}
|
|
320
339
|
exports.emptyDirectory = emptyDirectory;
|
|
321
340
|
/* eslint-enable */
|
|
322
|
-
const pascalCase = (str) => str.charAt(0).toUpperCase() + lodash_1.camelCase(str.substr(1));
|
|
341
|
+
const pascalCase = (str) => str.charAt(0).toUpperCase() + (0, lodash_1.camelCase)(str.substr(1));
|
|
323
342
|
exports.pascalCase = pascalCase;
|
|
324
343
|
function getInstalledNpmPkgPath(pkgName, basedir) {
|
|
325
344
|
const resolvePath = require('resolve');
|
|
@@ -340,7 +359,7 @@ function getInstalledNpmPkgVersion(pkgName, basedir) {
|
|
|
340
359
|
}
|
|
341
360
|
exports.getInstalledNpmPkgVersion = getInstalledNpmPkgVersion;
|
|
342
361
|
const recursiveMerge = (src, ...args) => {
|
|
343
|
-
return lodash_1.mergeWith(src, ...args, (value, srcValue) => {
|
|
362
|
+
return (0, lodash_1.mergeWith)(src, ...args, (value, srcValue) => {
|
|
344
363
|
const typeValue = typeof value;
|
|
345
364
|
const typeSrcValue = typeof srcValue;
|
|
346
365
|
if (typeValue !== typeSrcValue)
|
|
@@ -349,20 +368,20 @@ const recursiveMerge = (src, ...args) => {
|
|
|
349
368
|
return value.concat(srcValue);
|
|
350
369
|
}
|
|
351
370
|
if (typeValue === 'object') {
|
|
352
|
-
return exports.recursiveMerge(value, srcValue);
|
|
371
|
+
return (0, exports.recursiveMerge)(value, srcValue);
|
|
353
372
|
}
|
|
354
373
|
});
|
|
355
374
|
};
|
|
356
375
|
exports.recursiveMerge = recursiveMerge;
|
|
357
376
|
const mergeVisitors = (src, ...args) => {
|
|
358
377
|
const validFuncs = ['exit', 'enter'];
|
|
359
|
-
return lodash_1.mergeWith(src, ...args, (value, srcValue, key, object, srcObject) => {
|
|
378
|
+
return (0, lodash_1.mergeWith)(src, ...args, (value, srcValue, key, object, srcObject) => {
|
|
360
379
|
if (!object.hasOwnProperty(key) || !srcObject.hasOwnProperty(key)) {
|
|
361
380
|
return undefined;
|
|
362
381
|
}
|
|
363
382
|
const shouldMergeToArray = validFuncs.indexOf(key) > -1;
|
|
364
383
|
if (shouldMergeToArray) {
|
|
365
|
-
return lodash_1.flatMap([value, srcValue]);
|
|
384
|
+
return (0, lodash_1.flatMap)([value, srcValue]);
|
|
366
385
|
}
|
|
367
386
|
const [newValue, newSrcValue] = [value, srcValue].map(v => {
|
|
368
387
|
if (typeof v === 'function') {
|
|
@@ -374,7 +393,7 @@ const mergeVisitors = (src, ...args) => {
|
|
|
374
393
|
return v;
|
|
375
394
|
}
|
|
376
395
|
});
|
|
377
|
-
return exports.mergeVisitors(newValue, newSrcValue);
|
|
396
|
+
return (0, exports.mergeVisitors)(newValue, newSrcValue);
|
|
378
397
|
});
|
|
379
398
|
};
|
|
380
399
|
exports.mergeVisitors = mergeVisitors;
|
|
@@ -390,13 +409,15 @@ const applyArrayedVisitors = obj => {
|
|
|
390
409
|
};
|
|
391
410
|
}
|
|
392
411
|
else if (typeof funcs === 'object') {
|
|
393
|
-
exports.applyArrayedVisitors(funcs);
|
|
412
|
+
(0, exports.applyArrayedVisitors)(funcs);
|
|
394
413
|
}
|
|
395
414
|
}
|
|
396
415
|
return obj;
|
|
397
416
|
};
|
|
398
417
|
exports.applyArrayedVisitors = applyArrayedVisitors;
|
|
399
418
|
function unzip(zipPath) {
|
|
419
|
+
const Transform = require('stream').Transform;
|
|
420
|
+
const yauzl = require('yauzl');
|
|
400
421
|
return new Promise((resolve, reject) => {
|
|
401
422
|
yauzl.open(zipPath, { lazyEntries: true }, (err, zipfile) => {
|
|
402
423
|
if (err || !zipfile)
|
|
@@ -421,7 +442,7 @@ function unzip(zipPath) {
|
|
|
421
442
|
zipfile.openReadStream(entry, (err, readStream) => {
|
|
422
443
|
if (err || !readStream)
|
|
423
444
|
throw err;
|
|
424
|
-
const filter = new
|
|
445
|
+
const filter = new Transform();
|
|
425
446
|
filter._transform = function (chunk, _encoding, cb) {
|
|
426
447
|
cb(undefined, chunk);
|
|
427
448
|
};
|
|
@@ -444,13 +465,13 @@ function unzip(zipPath) {
|
|
|
444
465
|
});
|
|
445
466
|
}
|
|
446
467
|
exports.unzip = unzip;
|
|
447
|
-
const
|
|
468
|
+
const getAllFilesInFolder = (folder, filter = []) => __awaiter(void 0, void 0, void 0, function* () {
|
|
448
469
|
let files = [];
|
|
449
|
-
const list = readDirWithFileTypes(
|
|
470
|
+
const list = readDirWithFileTypes(folder);
|
|
450
471
|
yield Promise.all(list.map((item) => __awaiter(void 0, void 0, void 0, function* () {
|
|
451
|
-
const itemPath = path.join(
|
|
472
|
+
const itemPath = path.join(folder, item.name);
|
|
452
473
|
if (item.isDirectory) {
|
|
453
|
-
const _files = yield exports.
|
|
474
|
+
const _files = yield (0, exports.getAllFilesInFolder)(itemPath, filter);
|
|
454
475
|
files = [...files, ..._files];
|
|
455
476
|
}
|
|
456
477
|
else if (item.isFile) {
|
|
@@ -460,11 +481,11 @@ const getAllFilesInFloder = (floder, filter = []) => __awaiter(void 0, void 0, v
|
|
|
460
481
|
})));
|
|
461
482
|
return files;
|
|
462
483
|
});
|
|
463
|
-
exports.
|
|
464
|
-
function readDirWithFileTypes(
|
|
465
|
-
const list = fs.readdirSync(
|
|
484
|
+
exports.getAllFilesInFolder = getAllFilesInFolder;
|
|
485
|
+
function readDirWithFileTypes(folder) {
|
|
486
|
+
const list = fs.readdirSync(folder);
|
|
466
487
|
const res = list.map(name => {
|
|
467
|
-
const stat = fs.statSync(path.join(
|
|
488
|
+
const stat = fs.statSync(path.join(folder, name));
|
|
468
489
|
return {
|
|
469
490
|
name,
|
|
470
491
|
isDirectory: stat.isDirectory(),
|
|
@@ -492,6 +513,8 @@ function removeHeadSlash(str) {
|
|
|
492
513
|
}
|
|
493
514
|
exports.removeHeadSlash = removeHeadSlash;
|
|
494
515
|
function analyzeImport(filePath) {
|
|
516
|
+
const parser = require('@babel/parser');
|
|
517
|
+
const traverse = require('@babel/traverse').default;
|
|
495
518
|
const code = fs.readFileSync(filePath).toString();
|
|
496
519
|
let importPaths = [];
|
|
497
520
|
filePath = path.dirname(filePath);
|
|
@@ -504,7 +527,7 @@ function analyzeImport(filePath) {
|
|
|
504
527
|
'optionalChaining'
|
|
505
528
|
]
|
|
506
529
|
});
|
|
507
|
-
|
|
530
|
+
traverse(ast, {
|
|
508
531
|
ImportDeclaration({ node }) {
|
|
509
532
|
const list = [];
|
|
510
533
|
const source = node.source.value;
|
|
@@ -522,7 +545,9 @@ function analyzeImport(filePath) {
|
|
|
522
545
|
if (!dep)
|
|
523
546
|
return;
|
|
524
547
|
importPaths.push(dep);
|
|
525
|
-
|
|
548
|
+
if (path.extname(dep) !== '.json') {
|
|
549
|
+
importPaths = importPaths.concat(analyzeImport(dep));
|
|
550
|
+
}
|
|
526
551
|
}
|
|
527
552
|
});
|
|
528
553
|
return importPaths;
|
|
@@ -615,16 +640,17 @@ function readConfig(configPath) {
|
|
|
615
640
|
let result = {};
|
|
616
641
|
if (fs.existsSync(configPath)) {
|
|
617
642
|
const importPaths = constants_1.REG_SCRIPTS.test(configPath) ? analyzeImport(configPath) : [];
|
|
618
|
-
|
|
643
|
+
(0, swcRegister_1.default)({
|
|
619
644
|
only: [
|
|
620
645
|
configPath,
|
|
621
646
|
filepath => importPaths.includes(filepath)
|
|
622
|
-
]
|
|
647
|
+
],
|
|
648
|
+
plugin: m => new swcRegister_1.InjectDefineConfigHeader().visitProgram(m)
|
|
623
649
|
});
|
|
624
650
|
importPaths.concat([configPath]).forEach(item => {
|
|
625
651
|
delete require.cache[item];
|
|
626
652
|
});
|
|
627
|
-
result = exports.getModuleDefaultExport(require(configPath));
|
|
653
|
+
result = (0, exports.getModuleDefaultExport)(require(configPath));
|
|
628
654
|
}
|
|
629
655
|
else {
|
|
630
656
|
result = readPageConfig(configPath);
|
|
@@ -632,3 +658,4 @@ function readConfig(configPath) {
|
|
|
632
658
|
return result;
|
|
633
659
|
}
|
|
634
660
|
exports.readConfig = readConfig;
|
|
661
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAA8C;AAC9C,6CAA8B;AAC9B,mCAAqE;AACrE,uCAAwB;AACxB,2CAA4B;AAE5B,2CAUoB;AACpB,6DAA2E;AAC3E,yCAAkC;AAElC,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAA;AAEvC,SAAgB,aAAa,CAAE,IAAY;IACzC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,G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0",
|
|
4
4
|
"description": "Taro Helper",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"types": "
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "run-s clean prod",
|
|
9
|
-
"dev": "tsc -w",
|
|
10
|
-
"prod": "tsc",
|
|
11
|
-
"clean": "rimraf dist",
|
|
12
|
-
"prepack": "npm run build",
|
|
13
|
-
"test": "jest",
|
|
14
|
-
"test:dev": "jest --watch"
|
|
15
|
-
},
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
16
7
|
"repository": {
|
|
17
8
|
"type": "git",
|
|
18
9
|
"url": "git+https://github.com/NervJS/taro.git"
|
|
@@ -40,7 +31,9 @@
|
|
|
40
31
|
"@babel/preset-typescript": "^7.14.5",
|
|
41
32
|
"@babel/register": "^7.14.5",
|
|
42
33
|
"@babel/runtime": "^7.14.5",
|
|
43
|
-
"@
|
|
34
|
+
"@swc/core": "^1.2.204",
|
|
35
|
+
"@swc/register": "^0.1.10",
|
|
36
|
+
"ansi-escapes": "^4.3.2",
|
|
44
37
|
"chalk": "3.0.0",
|
|
45
38
|
"chokidar": "^3.3.1",
|
|
46
39
|
"cross-spawn": "^7.0.3",
|
|
@@ -48,8 +41,16 @@
|
|
|
48
41
|
"find-yarn-workspace-root": "2.0.0",
|
|
49
42
|
"fs-extra": "^8.0.1",
|
|
50
43
|
"lodash": "^4.17.21",
|
|
51
|
-
"resolve": "^1.
|
|
44
|
+
"resolve": "^1.22.0",
|
|
45
|
+
"supports-hyperlinks": "^2.2.0",
|
|
52
46
|
"yauzl": "2.10.0"
|
|
53
47
|
},
|
|
54
|
-
"
|
|
55
|
-
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "run-s clean prod",
|
|
50
|
+
"dev": "tsc -w",
|
|
51
|
+
"prod": "tsc",
|
|
52
|
+
"clean": "rimraf dist",
|
|
53
|
+
"test": "jest",
|
|
54
|
+
"test:dev": "jest --watch"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/types/babelRegister.d.ts
DELETED
package/types/index.d.ts
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import fs from 'fs-extra';
|
|
2
|
-
import * as chokidar from 'chokidar';
|
|
3
|
-
import createDebug from 'debug';
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import { processTypeEnum, IProcessTypeMap } from './constants';
|
|
6
|
-
import * as utils from './utils';
|
|
7
|
-
import * as npm from './npm';
|
|
8
|
-
import createBabelRegister, { injectDefineConfigHeader } from './babelRegister';
|
|
9
|
-
|
|
10
|
-
export declare enum META_TYPE {
|
|
11
|
-
ENTRY = 'ENTRY',
|
|
12
|
-
PAGE = 'PAGE',
|
|
13
|
-
COMPONENT = 'COMPONENT',
|
|
14
|
-
NORMAL = 'NORMAL',
|
|
15
|
-
STATIC = 'STATIC',
|
|
16
|
-
CONFIG = 'CONFIG',
|
|
17
|
-
EXPORTS = 'EXPORTS'
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export declare enum FRAMEWORK_MAP {
|
|
21
|
-
VUE = 'vue',
|
|
22
|
-
VUE3 = 'vue3',
|
|
23
|
-
REACT = 'react',
|
|
24
|
-
NERV = 'nerv'
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
declare interface helper {
|
|
28
|
-
npm: typeof npm;
|
|
29
|
-
createBabelRegister: typeof createBabelRegister;
|
|
30
|
-
injectDefineConfigHeader: typeof injectDefineConfigHeader;
|
|
31
|
-
fs: typeof fs;
|
|
32
|
-
chokidar: typeof chokidar;
|
|
33
|
-
chalk: typeof chalk;
|
|
34
|
-
createDebug: createDebug.Debug & {
|
|
35
|
-
debug: createDebug.Debug;
|
|
36
|
-
default: createDebug.Debug;
|
|
37
|
-
};
|
|
38
|
-
normalizePath(path: string): string;
|
|
39
|
-
isNpmPkg(name: string): boolean;
|
|
40
|
-
isQuickAppPkg(name: string): boolean;
|
|
41
|
-
isAliasPath(name: string, pathAlias?: object): boolean;
|
|
42
|
-
replaceAliasPath(filePath: string, name: string, pathAlias?: object): string;
|
|
43
|
-
promoteRelativePath(fPath: string): string;
|
|
44
|
-
resolveStylePath(p: string): string;
|
|
45
|
-
printLog(type: processTypeEnum, tag: string, filePath?: string | undefined): void;
|
|
46
|
-
recursiveFindNodeModules(filePath: string): string;
|
|
47
|
-
getUserHomeDir(): string;
|
|
48
|
-
getTaroPath(): string;
|
|
49
|
-
getConfig(): object;
|
|
50
|
-
getSystemUsername(): string;
|
|
51
|
-
shouldUseYarn(): boolean;
|
|
52
|
-
shouldUseCnpm(): boolean;
|
|
53
|
-
isEmptyObject(obj: any): boolean;
|
|
54
|
-
resolveScriptPath(p: string): string;
|
|
55
|
-
resolveMainFilePath(p: string, extArrs?: string[]): string
|
|
56
|
-
generateEnvList(env: object): object;
|
|
57
|
-
generateConstantsList(constants: object): object;
|
|
58
|
-
cssImports(content: string): string[];
|
|
59
|
-
emptyDirectory(dirPath: string, opts?: {
|
|
60
|
-
excludes: string[];
|
|
61
|
-
}): void;
|
|
62
|
-
getInstalledNpmPkgPath(pkgName: string, basedir: string): string | null;
|
|
63
|
-
getInstalledNpmPkgVersion(pkgName: string, basedir: string): string | null;
|
|
64
|
-
unzip(zipPath: any): Promise<unknown>;
|
|
65
|
-
getBabelConfig(babel: any): any;
|
|
66
|
-
readDirWithFileTypes(floder: string): utils.FileStat[];
|
|
67
|
-
extnameExpRegOf(filePath: string): RegExp;
|
|
68
|
-
addPlatforms(platform: string): void;
|
|
69
|
-
isNodeModule: (filename: string) => boolean;
|
|
70
|
-
pascalCase: (str: string) => string;
|
|
71
|
-
recursiveMerge: <T = any>(src: Partial<T>, ...args: (Partial<T> | undefined)[]) => any;
|
|
72
|
-
mergeVisitors: (src: any, ...args: any[]) => any;
|
|
73
|
-
applyArrayedVisitors: (obj: any) => any;
|
|
74
|
-
getAllFilesInFloder: (floder: string, filter?: string[]) => Promise<string[]>;
|
|
75
|
-
getModuleDefaultExport: (exports: any) => any;
|
|
76
|
-
removeHeadSlash: (str: string) => string;
|
|
77
|
-
readConfig: (configPath: string) => any;
|
|
78
|
-
readPageConfig: (configPath: string) => any;
|
|
79
|
-
PLATFORMS: any;
|
|
80
|
-
processTypeEnum: typeof processTypeEnum;
|
|
81
|
-
processTypeMap: IProcessTypeMap;
|
|
82
|
-
CSS_EXT: string[];
|
|
83
|
-
SCSS_EXT: string[];
|
|
84
|
-
JS_EXT: string[];
|
|
85
|
-
TS_EXT: string[];
|
|
86
|
-
UX_EXT: string[];
|
|
87
|
-
SCRIPT_EXT: string[];
|
|
88
|
-
VUE_EXT: string[];
|
|
89
|
-
REG_JS: RegExp;
|
|
90
|
-
REG_SCRIPT: RegExp;
|
|
91
|
-
REG_TYPESCRIPT: RegExp;
|
|
92
|
-
REG_SCRIPTS: RegExp;
|
|
93
|
-
REG_VUE: RegExp;
|
|
94
|
-
REG_SASS: RegExp;
|
|
95
|
-
REG_SASS_SASS: RegExp;
|
|
96
|
-
REG_SASS_SCSS: RegExp;
|
|
97
|
-
REG_LESS: RegExp;
|
|
98
|
-
REG_STYLUS: RegExp;
|
|
99
|
-
REG_STYLE: RegExp;
|
|
100
|
-
REG_CSS: RegExp;
|
|
101
|
-
REG_MEDIA: RegExp;
|
|
102
|
-
REG_IMAGE: RegExp;
|
|
103
|
-
REG_FONT: RegExp;
|
|
104
|
-
REG_JSON: RegExp;
|
|
105
|
-
REG_UX: RegExp;
|
|
106
|
-
REG_TEMPLATE: RegExp;
|
|
107
|
-
REG_WXML_IMPORT: RegExp;
|
|
108
|
-
REG_URL: RegExp;
|
|
109
|
-
CSS_IMPORT_REG: RegExp;
|
|
110
|
-
NODE_MODULES: "node_modules";
|
|
111
|
-
NODE_MODULES_REG: RegExp;
|
|
112
|
-
PROJECT_CONFIG: "config/index";
|
|
113
|
-
DEVICE_RATIO: {
|
|
114
|
-
640: number;
|
|
115
|
-
750: number;
|
|
116
|
-
828: number;
|
|
117
|
-
};
|
|
118
|
-
FILE_PROCESSOR_MAP: {
|
|
119
|
-
'.js': string;
|
|
120
|
-
'.scss': string;
|
|
121
|
-
'.sass': string;
|
|
122
|
-
'.less': string;
|
|
123
|
-
'.styl': string;
|
|
124
|
-
};
|
|
125
|
-
META_TYPE: typeof META_TYPE;
|
|
126
|
-
FRAMEWORK_MAP: typeof FRAMEWORK_MAP;
|
|
127
|
-
UPDATE_PACKAGE_LIST: string[];
|
|
128
|
-
taroJsComponents: "@tarojs/components";
|
|
129
|
-
taroJsQuickAppComponents: "@tarojs/components-qa";
|
|
130
|
-
taroJsFramework: "@tarojs/taro";
|
|
131
|
-
taroJsRedux: "@tarojs/redux";
|
|
132
|
-
taroJsMobx: "@tarojs/mobx";
|
|
133
|
-
taroJsMobxCommon: "@tarojs/mobx-common";
|
|
134
|
-
DEVICE_RATIO_NAME: "deviceRatio";
|
|
135
|
-
isWindows: boolean;
|
|
136
|
-
DEFAULT_TEMPLATE_SRC: "github:NervJS/taro-project-templates#v3.1";
|
|
137
|
-
DEFAULT_TEMPLATE_SRC_GITEE: "direct:https://gitee.com/o2team/taro-project-templates.git#v3.1";
|
|
138
|
-
TARO_CONFIG_FLODER: ".taro3.1";
|
|
139
|
-
TARO_BASE_CONFIG: "index.json";
|
|
140
|
-
OUTPUT_DIR: "dist";
|
|
141
|
-
SOURCE_DIR: "src";
|
|
142
|
-
TEMP_DIR: ".temp";
|
|
143
|
-
NPM_DIR: "npm";
|
|
144
|
-
ENTRY: "app";
|
|
145
|
-
FRAMEWORK_EXT_MAP: Record<FRAMEWORK_MAP, string[]>
|
|
146
|
-
}
|
|
147
|
-
declare const helper: helper
|
|
148
|
-
// @ts-ignore
|
|
149
|
-
export = helper
|