@tarojs/helper 3.5.0-beta.0 → 3.5.0-beta.1
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/constants.js +3 -3
- package/dist/swcRegister.js +3 -3
- package/dist/utils.js +11 -11
- package/package.json +3 -3
- package/types/constants.d.ts +1 -1
- package/types/index.d.ts +127 -123
- package/types/utils.d.ts +2 -2
package/dist/constants.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TARO_BASE_CONFIG = exports.
|
|
3
|
+
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;
|
|
4
4
|
exports.FRAMEWORK_EXT_MAP = exports.FRAMEWORK_MAP = exports.ENTRY = exports.NPM_DIR = exports.TEMP_DIR = exports.SOURCE_DIR = exports.OUTPUT_DIR = void 0;
|
|
5
|
-
const os = require("os");
|
|
6
5
|
const chalk = require("chalk");
|
|
6
|
+
const os = require("os");
|
|
7
7
|
// eslint-disable-next-line dot-notation
|
|
8
8
|
exports.PLATFORMS = global['PLATFORMS'] = global['PLATFORMS'] || {};
|
|
9
9
|
var processTypeEnum;
|
|
@@ -170,7 +170,7 @@ exports.DEVICE_RATIO_NAME = 'deviceRatio';
|
|
|
170
170
|
exports.isWindows = os.platform() === 'win32';
|
|
171
171
|
exports.DEFAULT_TEMPLATE_SRC = 'github:NervJS/taro-project-templates#v3.5';
|
|
172
172
|
exports.DEFAULT_TEMPLATE_SRC_GITEE = 'direct:https://gitee.com/o2team/taro-project-templates.git#v3.5';
|
|
173
|
-
exports.
|
|
173
|
+
exports.TARO_CONFIG_FOLDER = '.taro3.5';
|
|
174
174
|
exports.TARO_BASE_CONFIG = 'index.json';
|
|
175
175
|
exports.OUTPUT_DIR = 'dist';
|
|
176
176
|
exports.SOURCE_DIR = 'src';
|
package/dist/swcRegister.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.InjectDefineConfigHeader = void 0;
|
|
4
4
|
const Visitor_js_1 = require("@swc/core/Visitor.js");
|
|
5
|
-
class
|
|
5
|
+
class InjectDefineConfigHeader extends Visitor_js_1.Visitor {
|
|
6
6
|
visitTsType(expression) {
|
|
7
7
|
return expression;
|
|
8
8
|
}
|
|
@@ -14,7 +14,7 @@ class InjectDefinConfigHeader extends Visitor_js_1.Visitor {
|
|
|
14
14
|
return expression;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
exports.
|
|
17
|
+
exports.InjectDefineConfigHeader = InjectDefineConfigHeader;
|
|
18
18
|
function createSwcRegister({ only, plugin }) {
|
|
19
19
|
const config = {
|
|
20
20
|
only: Array.from(new Set([...only])),
|
package/dist/utils.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.readConfig = exports.readPageConfig = exports.removeHeadSlash = exports.getModuleDefaultExport = exports.addPlatforms = exports.extnameExpRegOf = exports.readDirWithFileTypes = exports.
|
|
12
|
+
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;
|
|
13
13
|
const chalk = require("chalk");
|
|
14
14
|
const child_process = require("child_process");
|
|
15
15
|
const fs = require("fs-extra");
|
|
@@ -153,7 +153,7 @@ function getUserHomeDir() {
|
|
|
153
153
|
}
|
|
154
154
|
exports.getUserHomeDir = getUserHomeDir;
|
|
155
155
|
function getTaroPath() {
|
|
156
|
-
const taroPath = path.join(getUserHomeDir(), constants_1.
|
|
156
|
+
const taroPath = path.join(getUserHomeDir(), constants_1.TARO_CONFIG_FOLDER);
|
|
157
157
|
if (!fs.existsSync(taroPath)) {
|
|
158
158
|
fs.ensureDirSync(taroPath);
|
|
159
159
|
}
|
|
@@ -442,13 +442,13 @@ function unzip(zipPath) {
|
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
444
|
exports.unzip = unzip;
|
|
445
|
-
const
|
|
445
|
+
const getAllFilesInFolder = (folder, filter = []) => __awaiter(void 0, void 0, void 0, function* () {
|
|
446
446
|
let files = [];
|
|
447
|
-
const list = readDirWithFileTypes(
|
|
447
|
+
const list = readDirWithFileTypes(folder);
|
|
448
448
|
yield Promise.all(list.map((item) => __awaiter(void 0, void 0, void 0, function* () {
|
|
449
|
-
const itemPath = path.join(
|
|
449
|
+
const itemPath = path.join(folder, item.name);
|
|
450
450
|
if (item.isDirectory) {
|
|
451
|
-
const _files = yield (0, exports.
|
|
451
|
+
const _files = yield (0, exports.getAllFilesInFolder)(itemPath, filter);
|
|
452
452
|
files = [...files, ..._files];
|
|
453
453
|
}
|
|
454
454
|
else if (item.isFile) {
|
|
@@ -458,11 +458,11 @@ const getAllFilesInFloder = (floder, filter = []) => __awaiter(void 0, void 0, v
|
|
|
458
458
|
})));
|
|
459
459
|
return files;
|
|
460
460
|
});
|
|
461
|
-
exports.
|
|
462
|
-
function readDirWithFileTypes(
|
|
463
|
-
const list = fs.readdirSync(
|
|
461
|
+
exports.getAllFilesInFolder = getAllFilesInFolder;
|
|
462
|
+
function readDirWithFileTypes(folder) {
|
|
463
|
+
const list = fs.readdirSync(folder);
|
|
464
464
|
const res = list.map(name => {
|
|
465
|
-
const stat = fs.statSync(path.join(
|
|
465
|
+
const stat = fs.statSync(path.join(folder, name));
|
|
466
466
|
return {
|
|
467
467
|
name,
|
|
468
468
|
isDirectory: stat.isDirectory(),
|
|
@@ -622,7 +622,7 @@ function readConfig(configPath) {
|
|
|
622
622
|
configPath,
|
|
623
623
|
filepath => importPaths.includes(filepath)
|
|
624
624
|
],
|
|
625
|
-
plugin: m => new swcRegister_1.
|
|
625
|
+
plugin: m => new swcRegister_1.InjectDefineConfigHeader().visitProgram(m)
|
|
626
626
|
});
|
|
627
627
|
importPaths.concat([configPath]).forEach(item => {
|
|
628
628
|
delete require.cache[item];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/helper",
|
|
3
|
-
"version": "3.5.0-beta.
|
|
3
|
+
"version": "3.5.0-beta.1",
|
|
4
4
|
"description": "Taro Helper",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@babel/runtime": "^7.14.5",
|
|
43
43
|
"@swc/core": "^1.2.147",
|
|
44
44
|
"@swc/register": "^0.1.10",
|
|
45
|
-
"@tarojs/taro": "3.5.0-beta.
|
|
45
|
+
"@tarojs/taro": "3.5.0-beta.1",
|
|
46
46
|
"chalk": "3.0.0",
|
|
47
47
|
"chokidar": "^3.3.1",
|
|
48
48
|
"cross-spawn": "^7.0.3",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"resolve": "^1.6.0",
|
|
54
54
|
"yauzl": "2.10.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "ba9d945ccebb86f06edb7f845110526d92dc7b00"
|
|
57
57
|
}
|
package/types/constants.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export declare const DEVICE_RATIO_NAME = "deviceRatio";
|
|
|
75
75
|
export declare const isWindows: boolean;
|
|
76
76
|
export declare const DEFAULT_TEMPLATE_SRC = "github:NervJS/taro-project-templates#v3.5";
|
|
77
77
|
export declare const DEFAULT_TEMPLATE_SRC_GITEE = "direct:https://gitee.com/o2team/taro-project-templates.git#v3.5";
|
|
78
|
-
export declare const
|
|
78
|
+
export declare const TARO_CONFIG_FOLDER = ".taro3.5";
|
|
79
79
|
export declare const TARO_BASE_CONFIG = "index.json";
|
|
80
80
|
export declare const OUTPUT_DIR = "dist";
|
|
81
81
|
export declare const SOURCE_DIR = "src";
|
package/types/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import fs from 'fs-extra'
|
|
2
|
-
import * as chokidar from 'chokidar'
|
|
3
|
-
import createDebug from 'debug'
|
|
4
|
-
import chalk from 'chalk'
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import fs from 'fs-extra'
|
|
2
|
+
import * as chokidar from 'chokidar'
|
|
3
|
+
import createDebug from 'debug'
|
|
4
|
+
import chalk from 'chalk'
|
|
5
|
+
|
|
6
|
+
import { processTypeEnum, IProcessTypeMap } from './constants'
|
|
7
|
+
import * as utils from './utils'
|
|
8
|
+
import * as npm from './npm'
|
|
9
|
+
import createBabelRegister, { injectDefineConfigHeader } from './babelRegister'
|
|
10
|
+
import createSwcRegister from './swcRegister'
|
|
10
11
|
|
|
11
12
|
export declare enum META_TYPE {
|
|
12
13
|
ENTRY = 'ENTRY',
|
|
@@ -26,124 +27,127 @@ export declare enum FRAMEWORK_MAP {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
declare interface helper {
|
|
29
|
-
npm: typeof npm
|
|
30
|
-
createSwcRegister: typeof createSwcRegister
|
|
31
|
-
createBabelRegister: typeof createBabelRegister
|
|
32
|
-
injectDefineConfigHeader: typeof injectDefineConfigHeader
|
|
33
|
-
fs: typeof fs
|
|
34
|
-
chokidar: typeof chokidar
|
|
35
|
-
chalk: typeof chalk
|
|
30
|
+
npm: typeof npm
|
|
31
|
+
createSwcRegister: typeof createSwcRegister
|
|
32
|
+
createBabelRegister: typeof createBabelRegister
|
|
33
|
+
injectDefineConfigHeader: typeof injectDefineConfigHeader
|
|
34
|
+
fs: typeof fs
|
|
35
|
+
chokidar: typeof chokidar
|
|
36
|
+
chalk: typeof chalk
|
|
36
37
|
createDebug: createDebug.Debug & {
|
|
37
|
-
debug: createDebug.Debug
|
|
38
|
-
default: createDebug.Debug
|
|
39
|
-
}
|
|
40
|
-
normalizePath(path: string): string
|
|
41
|
-
isNpmPkg(name: string): boolean
|
|
42
|
-
isQuickAppPkg(name: string): boolean
|
|
43
|
-
isAliasPath(name: string, pathAlias?: object): boolean
|
|
44
|
-
replaceAliasPath(filePath: string, name: string, pathAlias?: object): string
|
|
45
|
-
promoteRelativePath(fPath: string): string
|
|
46
|
-
resolveStylePath(p: string): string
|
|
47
|
-
printLog(type: processTypeEnum, tag: string, filePath?: string | undefined): void
|
|
48
|
-
recursiveFindNodeModules(filePath: string): string
|
|
49
|
-
getUserHomeDir(): string
|
|
50
|
-
getTaroPath(): string
|
|
51
|
-
getConfig(): object
|
|
52
|
-
getSystemUsername(): string
|
|
53
|
-
shouldUseYarn(): boolean
|
|
54
|
-
shouldUseCnpm(): boolean
|
|
55
|
-
isEmptyObject(obj: any): boolean
|
|
56
|
-
resolveScriptPath(p: string): string
|
|
38
|
+
debug: createDebug.Debug
|
|
39
|
+
default: createDebug.Debug
|
|
40
|
+
}
|
|
41
|
+
normalizePath(path: string): string
|
|
42
|
+
isNpmPkg(name: string): boolean
|
|
43
|
+
isQuickAppPkg(name: string): boolean
|
|
44
|
+
isAliasPath(name: string, pathAlias?: object): boolean
|
|
45
|
+
replaceAliasPath(filePath: string, name: string, pathAlias?: object): string
|
|
46
|
+
promoteRelativePath(fPath: string): string
|
|
47
|
+
resolveStylePath(p: string): string
|
|
48
|
+
printLog(type: processTypeEnum, tag: string, filePath?: string | undefined): void
|
|
49
|
+
recursiveFindNodeModules(filePath: string): string
|
|
50
|
+
getUserHomeDir(): string
|
|
51
|
+
getTaroPath(): string
|
|
52
|
+
getConfig(): object
|
|
53
|
+
getSystemUsername(): string
|
|
54
|
+
shouldUseYarn(): boolean
|
|
55
|
+
shouldUseCnpm(): boolean
|
|
56
|
+
isEmptyObject(obj: any): boolean
|
|
57
|
+
resolveScriptPath(p: string): string
|
|
57
58
|
resolveMainFilePath(p: string, extArrs?: string[]): string
|
|
58
|
-
generateEnvList(env: object): object
|
|
59
|
-
generateConstantsList(constants: object): object
|
|
60
|
-
cssImports(content: string): string[]
|
|
61
|
-
emptyDirectory(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
59
|
+
generateEnvList(env: object): object
|
|
60
|
+
generateConstantsList(constants: object): object
|
|
61
|
+
cssImports(content: string): string[]
|
|
62
|
+
emptyDirectory(
|
|
63
|
+
dirPath: string,
|
|
64
|
+
opts?: {
|
|
65
|
+
excludes: string[]
|
|
66
|
+
}
|
|
67
|
+
): void
|
|
68
|
+
getInstalledNpmPkgPath(pkgName: string, basedir: string): string | null
|
|
69
|
+
getInstalledNpmPkgVersion(pkgName: string, basedir: string): string | null
|
|
70
|
+
unzip(zipPath: any): Promise<unknown>
|
|
71
|
+
getBabelConfig(babel: any): any
|
|
72
|
+
readDirWithFileTypes(folder: string): utils.FileStat[]
|
|
73
|
+
extnameExpRegOf(filePath: string): RegExp
|
|
74
|
+
addPlatforms(platform: string): void
|
|
75
|
+
isNodeModule: (filename: string) => boolean
|
|
76
|
+
pascalCase: (str: string) => string
|
|
77
|
+
recursiveMerge: <T = any>(src: Partial<T>, ...args: (Partial<T> | undefined)[]) => any
|
|
78
|
+
mergeVisitors: (src: any, ...args: any[]) => any
|
|
79
|
+
applyArrayedVisitors: (obj: any) => any
|
|
80
|
+
getAllFilesInFolder: (folder: string, filter?: string[]) => Promise<string[]>
|
|
81
|
+
getModuleDefaultExport: (exports: any) => any
|
|
82
|
+
removeHeadSlash: (str: string) => string
|
|
83
|
+
readConfig: (configPath: string) => any
|
|
84
|
+
readPageConfig: (configPath: string) => any
|
|
85
|
+
PLATFORMS: any
|
|
86
|
+
processTypeEnum: typeof processTypeEnum
|
|
87
|
+
processTypeMap: IProcessTypeMap
|
|
88
|
+
CSS_EXT: string[]
|
|
89
|
+
SCSS_EXT: string[]
|
|
90
|
+
JS_EXT: string[]
|
|
91
|
+
TS_EXT: string[]
|
|
92
|
+
UX_EXT: string[]
|
|
93
|
+
SCRIPT_EXT: string[]
|
|
94
|
+
VUE_EXT: string[]
|
|
95
|
+
REG_JS: RegExp
|
|
96
|
+
REG_SCRIPT: RegExp
|
|
97
|
+
REG_TYPESCRIPT: RegExp
|
|
98
|
+
REG_SCRIPTS: RegExp
|
|
99
|
+
REG_VUE: RegExp
|
|
100
|
+
REG_SASS: RegExp
|
|
101
|
+
REG_SASS_SASS: RegExp
|
|
102
|
+
REG_SASS_SCSS: RegExp
|
|
103
|
+
REG_LESS: RegExp
|
|
104
|
+
REG_STYLUS: RegExp
|
|
105
|
+
REG_STYLE: RegExp
|
|
106
|
+
REG_CSS: RegExp
|
|
107
|
+
REG_MEDIA: RegExp
|
|
108
|
+
REG_IMAGE: RegExp
|
|
109
|
+
REG_FONT: RegExp
|
|
110
|
+
REG_JSON: RegExp
|
|
111
|
+
REG_UX: RegExp
|
|
112
|
+
REG_TEMPLATE: RegExp
|
|
113
|
+
REG_WXML_IMPORT: RegExp
|
|
114
|
+
REG_URL: RegExp
|
|
115
|
+
CSS_IMPORT_REG: RegExp
|
|
116
|
+
NODE_MODULES: 'node_modules'
|
|
117
|
+
NODE_MODULES_REG: RegExp
|
|
118
|
+
PROJECT_CONFIG: 'config/index'
|
|
115
119
|
DEVICE_RATIO: {
|
|
116
|
-
640: number
|
|
117
|
-
750: number
|
|
118
|
-
828: number
|
|
119
|
-
}
|
|
120
|
+
640: number
|
|
121
|
+
750: number
|
|
122
|
+
828: number
|
|
123
|
+
}
|
|
120
124
|
FILE_PROCESSOR_MAP: {
|
|
121
|
-
'.js': string
|
|
122
|
-
'.scss': string
|
|
123
|
-
'.sass': string
|
|
124
|
-
'.less': string
|
|
125
|
-
'.styl': string
|
|
126
|
-
}
|
|
127
|
-
META_TYPE: typeof META_TYPE
|
|
128
|
-
FRAMEWORK_MAP: typeof FRAMEWORK_MAP
|
|
129
|
-
UPDATE_PACKAGE_LIST: string[]
|
|
130
|
-
taroJsComponents:
|
|
131
|
-
taroJsQuickAppComponents:
|
|
132
|
-
taroJsFramework:
|
|
133
|
-
taroJsRedux:
|
|
134
|
-
taroJsMobx:
|
|
135
|
-
taroJsMobxCommon:
|
|
136
|
-
DEVICE_RATIO_NAME:
|
|
137
|
-
isWindows: boolean
|
|
138
|
-
DEFAULT_TEMPLATE_SRC:
|
|
139
|
-
DEFAULT_TEMPLATE_SRC_GITEE:
|
|
140
|
-
|
|
141
|
-
TARO_BASE_CONFIG:
|
|
142
|
-
OUTPUT_DIR:
|
|
143
|
-
SOURCE_DIR:
|
|
144
|
-
TEMP_DIR:
|
|
145
|
-
NPM_DIR:
|
|
146
|
-
ENTRY:
|
|
125
|
+
'.js': string
|
|
126
|
+
'.scss': string
|
|
127
|
+
'.sass': string
|
|
128
|
+
'.less': string
|
|
129
|
+
'.styl': string
|
|
130
|
+
}
|
|
131
|
+
META_TYPE: typeof META_TYPE
|
|
132
|
+
FRAMEWORK_MAP: typeof FRAMEWORK_MAP
|
|
133
|
+
UPDATE_PACKAGE_LIST: string[]
|
|
134
|
+
taroJsComponents: '@tarojs/components'
|
|
135
|
+
taroJsQuickAppComponents: '@tarojs/components-qa'
|
|
136
|
+
taroJsFramework: '@tarojs/taro'
|
|
137
|
+
taroJsRedux: '@tarojs/redux'
|
|
138
|
+
taroJsMobx: '@tarojs/mobx'
|
|
139
|
+
taroJsMobxCommon: '@tarojs/mobx-common'
|
|
140
|
+
DEVICE_RATIO_NAME: 'deviceRatio'
|
|
141
|
+
isWindows: boolean
|
|
142
|
+
DEFAULT_TEMPLATE_SRC: 'github:NervJS/taro-project-templates#v3.5'
|
|
143
|
+
DEFAULT_TEMPLATE_SRC_GITEE: 'direct:https://gitee.com/o2team/taro-project-templates.git#v3.5'
|
|
144
|
+
TARO_CONFIG_FOLDER: '.taro3.5'
|
|
145
|
+
TARO_BASE_CONFIG: 'index.json'
|
|
146
|
+
OUTPUT_DIR: 'dist'
|
|
147
|
+
SOURCE_DIR: 'src'
|
|
148
|
+
TEMP_DIR: '.temp'
|
|
149
|
+
NPM_DIR: 'npm'
|
|
150
|
+
ENTRY: 'app'
|
|
147
151
|
FRAMEWORK_EXT_MAP: Record<FRAMEWORK_MAP, string[]>
|
|
148
152
|
}
|
|
149
153
|
declare const helper: helper
|
package/types/utils.d.ts
CHANGED
|
@@ -31,13 +31,13 @@ export declare const mergeVisitors: (src: any, ...args: any[]) => any;
|
|
|
31
31
|
export declare const applyArrayedVisitors: (obj: any) => any;
|
|
32
32
|
export declare function unzip(zipPath: any): Promise<unknown>;
|
|
33
33
|
export declare function getBabelConfig(babel: any): any;
|
|
34
|
-
export declare const
|
|
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;
|