@spcsn/taro-cli 0.1.6 → 1.0.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/LICENSE +1 -153
- package/README.md +10 -7
- package/define-config.d.ts +1 -0
- package/define-config.js +1 -0
- package/dist/cli.js +140 -110
- package/dist/cli.js.map +1 -1
- package/dist/commands/{customCommand.d.ts → custom-command.d.ts} +1 -1
- package/dist/commands/custom-command.js +23 -0
- package/dist/commands/custom-command.js.map +1 -0
- package/dist/create/creator.js +2 -0
- package/dist/create/creator.js.map +1 -1
- package/dist/create/{fetchTemplate.js → fetch-template.js} +26 -33
- package/dist/create/fetch-template.js.map +1 -0
- package/dist/create/project.d.ts +2 -6
- package/dist/create/project.js +240 -285
- package/dist/create/project.js.map +1 -1
- package/dist/create/template-creator.d.ts +75 -0
- package/dist/create/template-creator.js +275 -0
- package/dist/create/template-creator.js.map +1 -0
- package/dist/doctor/validators.d.ts +7 -6
- package/dist/doctor/validators.js +6 -7
- package/dist/doctor/validators.js.map +1 -1
- package/dist/platform-weapp/apis-list.d.ts +1 -0
- package/dist/platform-weapp/apis-list.js +37 -0
- package/dist/platform-weapp/apis-list.js.map +1 -0
- package/dist/platform-weapp/apis.d.ts +16 -0
- package/dist/platform-weapp/apis.js +34 -0
- package/dist/platform-weapp/apis.js.map +1 -0
- package/dist/platform-weapp/components-react.d.ts +80 -0
- package/dist/platform-weapp/components-react.js +86 -0
- package/dist/platform-weapp/components-react.js.map +1 -0
- package/dist/platform-weapp/components.d.ts +4 -0
- package/dist/platform-weapp/components.js +520 -0
- package/dist/platform-weapp/components.js.map +1 -0
- package/dist/platform-weapp/index.d.ts +11 -0
- package/dist/platform-weapp/index.js +17 -0
- package/dist/platform-weapp/index.js.map +1 -0
- package/dist/platform-weapp/program.d.ts +35 -0
- package/dist/platform-weapp/program.js +64 -0
- package/dist/platform-weapp/program.js.map +1 -0
- package/dist/platform-weapp/runtime-utils.d.ts +27 -0
- package/dist/platform-weapp/runtime-utils.js +48 -0
- package/dist/platform-weapp/runtime-utils.js.map +1 -0
- package/dist/platform-weapp/runtime.d.ts +1 -0
- package/dist/platform-weapp/runtime.js +7 -0
- package/dist/platform-weapp/runtime.js.map +1 -0
- package/dist/platform-weapp/template.d.ts +39 -0
- package/dist/platform-weapp/template.js +119 -0
- package/dist/platform-weapp/template.js.map +1 -0
- package/dist/presets/commands/build.js +25 -45
- package/dist/presets/commands/build.js.map +1 -1
- package/dist/presets/commands/init.js +2 -4
- package/dist/presets/commands/init.js.map +1 -1
- package/dist/presets/constant/hooks.d.ts +0 -2
- package/dist/presets/constant/hooks.js +1 -3
- package/dist/presets/constant/hooks.js.map +1 -1
- package/dist/presets/files/generate-framework-info.js +68 -0
- package/dist/presets/files/generate-framework-info.js.map +1 -0
- package/dist/presets/files/{generateProjectConfig.js → generate-project-config.js} +1 -1
- package/dist/presets/files/generate-project-config.js.map +1 -0
- package/dist/presets/files/{writeFileToDist.js → write-file-to-dist.js} +1 -1
- package/dist/presets/files/write-file-to-dist.js.map +1 -0
- package/dist/presets/hooks/build.js +1 -3
- package/dist/presets/hooks/build.js.map +1 -1
- package/dist/presets/index.js +3 -5
- package/dist/presets/index.js.map +1 -1
- package/dist/util/{appConfig.d.ts → app-config.d.ts} +2 -2
- package/dist/util/{appConfig.js → app-config.js} +4 -3
- package/dist/util/app-config.js.map +1 -0
- package/dist/util/defineConfig.d.ts +5 -5
- package/dist/util/defineConfig.js.map +1 -1
- package/dist/util/index.d.ts +9 -1
- package/dist/util/index.js +54 -23
- package/dist/util/index.js.map +1 -1
- package/package.json +24 -27
- package/postinstall.js +1 -17
- package/src/cli.ts +185 -132
- package/src/commands/custom-command.ts +22 -0
- package/src/create/{fetchTemplate.ts → fetch-template.ts} +30 -35
- package/src/create/project.ts +31 -78
- package/src/create/template-creator.ts +325 -0
- package/src/doctor/validators.js +1 -0
- package/src/doctor/validators.ts +8 -6
- package/src/platform-weapp/apis-list.ts +33 -0
- package/src/platform-weapp/apis.ts +48 -0
- package/src/platform-weapp/components-react.ts +81 -0
- package/src/platform-weapp/components.ts +521 -0
- package/src/platform-weapp/index.ts +25 -0
- package/src/platform-weapp/program.ts +70 -0
- package/src/platform-weapp/runtime-utils.ts +57 -0
- package/src/platform-weapp/runtime.ts +6 -0
- package/src/platform-weapp/template.ts +150 -0
- package/src/presets/commands/build.ts +20 -40
- package/src/presets/commands/init.ts +1 -4
- package/src/presets/constant/hooks.js +12 -0
- package/src/presets/constant/hooks.ts +0 -2
- package/src/presets/files/{generateFrameworkInfo.ts → generate-framework-info.ts} +7 -1
- package/src/presets/hooks/build.ts +1 -3
- package/src/presets/index.ts +3 -5
- package/src/util/app-config.js +1 -0
- package/src/util/{appConfig.ts → app-config.ts} +5 -4
- package/src/util/defineConfig.ts +6 -6
- package/src/util/index.ts +67 -25
- package/templates/default/config/dev.js +1 -1
- package/templates/default/config/index.js +28 -40
- package/templates/default/config/prod.js +1 -1
- package/templates/default/package.json.tmpl +2 -17
- package/templates/default/types/global.d.ts +0 -4
- package/templates/plugin-compile/README.md +3 -1
- package/templates/plugin-compile/package.json.tmpl +1 -2
- package/templates/plugin-compile/src/index.ts +18 -28
- package/dist/commands/customCommand.js +0 -23
- package/dist/commands/customCommand.js.map +0 -1
- package/dist/config/packagesManagement.d.ts +0 -19
- package/dist/config/packagesManagement.js +0 -22
- package/dist/config/packagesManagement.js.map +0 -1
- package/dist/create/fetchTemplate.js.map +0 -1
- package/dist/create/page.d.ts +0 -65
- package/dist/create/page.js +0 -266
- package/dist/create/page.js.map +0 -1
- package/dist/create/plugin.d.ts +0 -16
- package/dist/create/plugin.js +0 -77
- package/dist/create/plugin.js.map +0 -1
- package/dist/presets/commands/config.js +0 -121
- package/dist/presets/commands/config.js.map +0 -1
- package/dist/presets/commands/create.js +0 -112
- package/dist/presets/commands/create.js.map +0 -1
- package/dist/presets/commands/doctor.js +0 -15
- package/dist/presets/commands/doctor.js.map +0 -1
- package/dist/presets/commands/global-config.d.ts +0 -3
- package/dist/presets/commands/global-config.js +0 -175
- package/dist/presets/commands/global-config.js.map +0 -1
- package/dist/presets/commands/help.d.ts +0 -3
- package/dist/presets/commands/help.js +0 -16
- package/dist/presets/commands/help.js.map +0 -1
- package/dist/presets/commands/info.d.ts +0 -3
- package/dist/presets/commands/info.js +0 -96
- package/dist/presets/commands/info.js.map +0 -1
- package/dist/presets/commands/inspect.d.ts +0 -3
- package/dist/presets/commands/inspect.js +0 -155
- package/dist/presets/commands/inspect.js.map +0 -1
- package/dist/presets/commands/update.d.ts +0 -3
- package/dist/presets/commands/update.js +0 -187
- package/dist/presets/commands/update.js.map +0 -1
- package/dist/presets/files/generateFrameworkInfo.d.ts +0 -3
- package/dist/presets/files/generateFrameworkInfo.js +0 -30
- package/dist/presets/files/generateFrameworkInfo.js.map +0 -1
- package/dist/presets/files/generateProjectConfig.d.ts +0 -3
- package/dist/presets/files/generateProjectConfig.js.map +0 -1
- package/dist/presets/files/writeFileToDist.d.ts +0 -3
- package/dist/presets/files/writeFileToDist.js.map +0 -1
- package/dist/presets/hooks/create.d.ts +0 -3
- package/dist/presets/hooks/create.js +0 -42
- package/dist/presets/hooks/create.js.map +0 -1
- package/dist/presets/platforms/plugin.d.ts +0 -3
- package/dist/presets/platforms/plugin.js +0 -106
- package/dist/presets/platforms/plugin.js.map +0 -1
- package/dist/presets/platforms/rn.d.ts +0 -3
- package/dist/presets/platforms/rn.js +0 -130
- package/dist/presets/platforms/rn.js.map +0 -1
- package/dist/util/appConfig.js.map +0 -1
- package/dist/util/createPage.d.ts +0 -9
- package/dist/util/createPage.js +0 -114
- package/dist/util/createPage.js.map +0 -1
- package/src/commands/customCommand.ts +0 -22
- package/src/config/packagesManagement.ts +0 -20
- package/src/config/rn-stylelint.json +0 -4
- package/src/create/page.ts +0 -325
- package/src/create/plugin.ts +0 -55
- package/src/presets/commands/config.ts +0 -86
- package/src/presets/commands/create.ts +0 -104
- package/src/presets/commands/doctor.ts +0 -21
- package/src/presets/commands/global-config.ts +0 -140
- package/src/presets/commands/help.ts +0 -17
- package/src/presets/commands/info.ts +0 -81
- package/src/presets/commands/inspect.ts +0 -137
- package/src/presets/commands/update.ts +0 -175
- package/src/presets/hooks/create.ts +0 -9
- package/src/presets/platforms/plugin.ts +0 -75
- package/src/presets/platforms/rn.ts +0 -125
- package/src/util/createPage.ts +0 -139
- package/templates/default/babel.config.js +0 -14
- /package/dist/create/{fetchTemplate.d.ts → fetch-template.d.ts} +0 -0
- /package/dist/presets/{commands/config.d.ts → files/generate-framework-info.d.ts} +0 -0
- /package/dist/presets/{commands/create.d.ts → files/generate-project-config.d.ts} +0 -0
- /package/dist/presets/{commands/doctor.d.ts → files/write-file-to-dist.d.ts} +0 -0
- /package/src/presets/files/{generateProjectConfig.ts → generate-project-config.ts} +0 -0
- /package/src/presets/files/{writeFileToDist.ts → write-file-to-dist.ts} +0 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export declare enum CompilerType {
|
|
2
|
+
Webpack4 = "Webpack4",
|
|
3
|
+
Webpack5 = "Webpack5",
|
|
4
|
+
Vite = "Vite"
|
|
5
|
+
}
|
|
6
|
+
export declare enum CSSType {
|
|
7
|
+
None = "None",
|
|
8
|
+
Sass = "Sass",
|
|
9
|
+
Stylus = "Stylus",
|
|
10
|
+
Less = "Less"
|
|
11
|
+
}
|
|
12
|
+
export declare enum FrameworkType {
|
|
13
|
+
React = "React",
|
|
14
|
+
Preact = "Preact",
|
|
15
|
+
Vue3 = "Vue3",
|
|
16
|
+
Solid = "Solid",
|
|
17
|
+
None = "None"
|
|
18
|
+
}
|
|
19
|
+
export declare enum NpmType {
|
|
20
|
+
Yarn = "Yarn",
|
|
21
|
+
Cnpm = "Cnpm",
|
|
22
|
+
Pnpm = "Pnpm",
|
|
23
|
+
Npm = "Npm"
|
|
24
|
+
}
|
|
25
|
+
export declare enum PeriodType {
|
|
26
|
+
CreateAPP = "CreateAPP",
|
|
27
|
+
CreatePage = "CreatePage"
|
|
28
|
+
}
|
|
29
|
+
export interface CreateOptions {
|
|
30
|
+
css?: CSSType;
|
|
31
|
+
cssExt?: string;
|
|
32
|
+
framework?: FrameworkType;
|
|
33
|
+
description?: string;
|
|
34
|
+
projectName: string;
|
|
35
|
+
version?: string;
|
|
36
|
+
date?: string;
|
|
37
|
+
typescript?: boolean;
|
|
38
|
+
buildEs5?: boolean;
|
|
39
|
+
template: string;
|
|
40
|
+
pageName?: string;
|
|
41
|
+
compiler?: CompilerType;
|
|
42
|
+
setPageName?: string;
|
|
43
|
+
subPkg?: string;
|
|
44
|
+
pageDir?: string;
|
|
45
|
+
setSubPkgPageName?: string;
|
|
46
|
+
changeExt?: boolean;
|
|
47
|
+
isCustomTemplate?: boolean;
|
|
48
|
+
pluginType?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface ProjectConfig {
|
|
51
|
+
projectRoot: string;
|
|
52
|
+
projectName: string;
|
|
53
|
+
npm: NpmType;
|
|
54
|
+
description?: string;
|
|
55
|
+
typescript?: boolean;
|
|
56
|
+
buildEs5?: boolean;
|
|
57
|
+
template: string;
|
|
58
|
+
css: CSSType;
|
|
59
|
+
autoInstall?: boolean;
|
|
60
|
+
framework: FrameworkType;
|
|
61
|
+
templateRoot: string;
|
|
62
|
+
version: string;
|
|
63
|
+
date?: string;
|
|
64
|
+
compiler?: CompilerType;
|
|
65
|
+
period: PeriodType;
|
|
66
|
+
}
|
|
67
|
+
type TemplateHandlerResult = boolean | {
|
|
68
|
+
setPageName?: string;
|
|
69
|
+
setSubPkgName?: string;
|
|
70
|
+
changeExt?: boolean;
|
|
71
|
+
};
|
|
72
|
+
type TemplateHandler = (error: Error | null, options: CreateOptions) => TemplateHandlerResult;
|
|
73
|
+
type TemplateHandlers = Record<string, TemplateHandler>;
|
|
74
|
+
export declare function createProject(conf: ProjectConfig, handlers: TemplateHandlers): Promise<void>;
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,275 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.PeriodType = exports.NpmType = exports.FrameworkType = exports.CSSType = exports.CompilerType = void 0;
|
|
37
|
+
exports.createProject = createProject;
|
|
38
|
+
const node_child_process_1 = require("node:child_process");
|
|
39
|
+
const promises_1 = require("node:fs/promises");
|
|
40
|
+
const path = __importStar(require("node:path"));
|
|
41
|
+
const taro_helper_1 = require("@spcsn/taro-helper");
|
|
42
|
+
var CompilerType;
|
|
43
|
+
(function (CompilerType) {
|
|
44
|
+
CompilerType["Webpack4"] = "Webpack4";
|
|
45
|
+
CompilerType["Webpack5"] = "Webpack5";
|
|
46
|
+
CompilerType["Vite"] = "Vite";
|
|
47
|
+
})(CompilerType || (exports.CompilerType = CompilerType = {}));
|
|
48
|
+
var CSSType;
|
|
49
|
+
(function (CSSType) {
|
|
50
|
+
CSSType["None"] = "None";
|
|
51
|
+
CSSType["Sass"] = "Sass";
|
|
52
|
+
CSSType["Stylus"] = "Stylus";
|
|
53
|
+
CSSType["Less"] = "Less";
|
|
54
|
+
})(CSSType || (exports.CSSType = CSSType = {}));
|
|
55
|
+
var FrameworkType;
|
|
56
|
+
(function (FrameworkType) {
|
|
57
|
+
FrameworkType["React"] = "React";
|
|
58
|
+
FrameworkType["Preact"] = "Preact";
|
|
59
|
+
FrameworkType["Vue3"] = "Vue3";
|
|
60
|
+
FrameworkType["Solid"] = "Solid";
|
|
61
|
+
FrameworkType["None"] = "None";
|
|
62
|
+
})(FrameworkType || (exports.FrameworkType = FrameworkType = {}));
|
|
63
|
+
var NpmType;
|
|
64
|
+
(function (NpmType) {
|
|
65
|
+
NpmType["Yarn"] = "Yarn";
|
|
66
|
+
NpmType["Cnpm"] = "Cnpm";
|
|
67
|
+
NpmType["Pnpm"] = "Pnpm";
|
|
68
|
+
NpmType["Npm"] = "Npm";
|
|
69
|
+
})(NpmType || (exports.NpmType = NpmType = {}));
|
|
70
|
+
var PeriodType;
|
|
71
|
+
(function (PeriodType) {
|
|
72
|
+
PeriodType["CreateAPP"] = "CreateAPP";
|
|
73
|
+
PeriodType["CreatePage"] = "CreatePage";
|
|
74
|
+
})(PeriodType || (exports.PeriodType = PeriodType = {}));
|
|
75
|
+
const TEMPLATE_CREATOR = 'template_creator.js';
|
|
76
|
+
const FILE_FILTER = new Set([TEMPLATE_CREATOR, '.DS_Store', '.npmrc']);
|
|
77
|
+
const MEDIA_FILE_PATTERN = /\.(png|jpe?g|gif|svg|webp|jar|keystore|tgz)$/i;
|
|
78
|
+
const STYLE_EXTENSIONS = {
|
|
79
|
+
[CSSType.None]: 'css',
|
|
80
|
+
[CSSType.Sass]: 'scss',
|
|
81
|
+
[CSSType.Stylus]: 'styl',
|
|
82
|
+
[CSSType.Less]: 'less',
|
|
83
|
+
};
|
|
84
|
+
const PACKAGE_MANAGERS = {
|
|
85
|
+
[NpmType.Yarn]: 'yarn',
|
|
86
|
+
[NpmType.Cnpm]: 'cnpm',
|
|
87
|
+
[NpmType.Pnpm]: 'pnpm',
|
|
88
|
+
[NpmType.Npm]: 'npm',
|
|
89
|
+
};
|
|
90
|
+
async function createProject(conf, handlers) {
|
|
91
|
+
const projectPath = path.join(conf.projectRoot, conf.projectName);
|
|
92
|
+
const templatePath = path.join(conf.templateRoot, 'templates', conf.template);
|
|
93
|
+
const templateFiles = await collectTemplateFiles(templatePath);
|
|
94
|
+
const createOptions = {
|
|
95
|
+
css: conf.css,
|
|
96
|
+
cssExt: STYLE_EXTENSIONS[conf.css],
|
|
97
|
+
framework: conf.framework,
|
|
98
|
+
description: conf.description,
|
|
99
|
+
projectName: conf.projectName,
|
|
100
|
+
version: conf.version,
|
|
101
|
+
date: conf.date,
|
|
102
|
+
typescript: conf.typescript,
|
|
103
|
+
buildEs5: conf.buildEs5,
|
|
104
|
+
template: conf.template,
|
|
105
|
+
pageName: 'index',
|
|
106
|
+
compiler: conf.compiler,
|
|
107
|
+
};
|
|
108
|
+
console.log();
|
|
109
|
+
console.log(`${taro_helper_1.chalk.green('✔')} ${taro_helper_1.chalk.rgb(102, 102, 102)(`创建项目: ${conf.projectName}`)}`);
|
|
110
|
+
for (const templateFile of templateFiles) {
|
|
111
|
+
await createTemplateFile({ templateFile, templatePath, projectPath, options: createOptions, handlers });
|
|
112
|
+
}
|
|
113
|
+
console.log();
|
|
114
|
+
await initGit(conf.projectName, projectPath);
|
|
115
|
+
if (conf.autoInstall ?? true) {
|
|
116
|
+
await installDeps(conf.npm, projectPath, () => printCreateSuccess(conf.projectName));
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
printCreateSuccess(conf.projectName);
|
|
120
|
+
}
|
|
121
|
+
async function createTemplateFile(args) {
|
|
122
|
+
const { templateFile, templatePath, projectPath, options, handlers } = args;
|
|
123
|
+
const relativeTemplatePath = normalizePath(templateFile.replace(templatePath, ''));
|
|
124
|
+
if (shouldSkipByFramework(relativeTemplatePath, options.framework))
|
|
125
|
+
return;
|
|
126
|
+
const handlerResult = handlers[relativeTemplatePath]?.(null, { ...options });
|
|
127
|
+
if (handlerResult === false)
|
|
128
|
+
return;
|
|
129
|
+
const destinationRelativePath = resolveDestinationRelativePath(relativeTemplatePath, handlerResult, options);
|
|
130
|
+
const sourcePath = path.join(templatePath, relativeTemplatePath);
|
|
131
|
+
const destinationPath = normalizeTemplateDestination(path.join(projectPath, destinationRelativePath));
|
|
132
|
+
await writeTemplateFile(sourcePath, destinationPath, options);
|
|
133
|
+
console.log(`${taro_helper_1.chalk.green('✔')} ${taro_helper_1.chalk.rgb(102, 102, 102)(`创建文件: ${destinationPath}`)}`);
|
|
134
|
+
}
|
|
135
|
+
function shouldSkipByFramework(relativeTemplatePath, framework) {
|
|
136
|
+
const isVueFramework = framework === FrameworkType.Vue3;
|
|
137
|
+
if (isVueFramework && relativeTemplatePath.endsWith('.jsx'))
|
|
138
|
+
return true;
|
|
139
|
+
return !isVueFramework && relativeTemplatePath.endsWith('.vue');
|
|
140
|
+
}
|
|
141
|
+
function resolveDestinationRelativePath(relativeTemplatePath, handlerResult, options) {
|
|
142
|
+
const handlerDestination = typeof handlerResult === 'object' ? handlerResult : undefined;
|
|
143
|
+
let destinationRelativePath = handlerDestination?.setPageName ?? relativeTemplatePath;
|
|
144
|
+
if (options.subPkg && handlerDestination?.setSubPkgName) {
|
|
145
|
+
destinationRelativePath = handlerDestination.setSubPkgName;
|
|
146
|
+
}
|
|
147
|
+
if (destinationRelativePath.startsWith('/')) {
|
|
148
|
+
destinationRelativePath = destinationRelativePath.slice(1);
|
|
149
|
+
}
|
|
150
|
+
const shouldChangeExt = handlerDestination?.changeExt ?? true;
|
|
151
|
+
if (options.typescript && shouldChangeExt && shouldConvertScriptExtension(destinationRelativePath)) {
|
|
152
|
+
destinationRelativePath = destinationRelativePath.replace(/\.jsx?$/, (extension) => extension === '.jsx' ? '.tsx' : '.ts');
|
|
153
|
+
}
|
|
154
|
+
if (shouldChangeExt && destinationRelativePath.endsWith('.css')) {
|
|
155
|
+
destinationRelativePath = destinationRelativePath.replace(/\.css$/, `.${options.cssExt ?? 'css'}`);
|
|
156
|
+
}
|
|
157
|
+
return destinationRelativePath;
|
|
158
|
+
}
|
|
159
|
+
function shouldConvertScriptExtension(filePath) {
|
|
160
|
+
if (!(filePath.endsWith('.js') || filePath.endsWith('.jsx')))
|
|
161
|
+
return false;
|
|
162
|
+
return !(filePath.endsWith('babel.config.js') || filePath.endsWith('.eslintrc.js'));
|
|
163
|
+
}
|
|
164
|
+
async function writeTemplateFile(sourcePath, destinationPath, options) {
|
|
165
|
+
await (0, promises_1.mkdir)(path.dirname(destinationPath), { recursive: true });
|
|
166
|
+
if (MEDIA_FILE_PATTERN.test(sourcePath)) {
|
|
167
|
+
await (0, promises_1.copyFile)(sourcePath, destinationPath);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const templateContent = await (0, promises_1.readFile)(sourcePath, 'utf8');
|
|
171
|
+
const renderedContent = renderTemplate(templateContent, options);
|
|
172
|
+
await (0, promises_1.writeFile)(destinationPath, renderedContent);
|
|
173
|
+
}
|
|
174
|
+
function renderTemplate(templateContent, options) {
|
|
175
|
+
return templateContent
|
|
176
|
+
.replace(/{{#if \(eq css "Sass"\) }}([\s\S]*?){{\/if}}/g, options.css === CSSType.Sass ? '$1' : '')
|
|
177
|
+
.replace(/{{#if \(eq css "Less"\) }}([\s\S]*?){{\/if}}/g, options.css === CSSType.Less ? '$1' : '')
|
|
178
|
+
.replace(/{{#if \(eq css "Stylus"\) }}([\s\S]*?){{\/if}}/g, options.css === CSSType.Stylus ? '$1' : '')
|
|
179
|
+
.replace(/{{#if typescript }}([\s\S]*?){{\/if}}/g, options.typescript ? '$1' : '')
|
|
180
|
+
.replace(/{{\s*to_pascal_case\s+pageName\s*}}/g, toPascalCase(options.pageName ?? 'index'))
|
|
181
|
+
.replace(/{{\s*projectName\s*}}/g, options.projectName)
|
|
182
|
+
.replace(/{{\s*description\s*}}/g, options.description ?? '')
|
|
183
|
+
.replace(/{{\s*template\s*}}/g, options.template)
|
|
184
|
+
.replace(/{{\s*typescript\s*}}/g, String(Boolean(options.typescript)))
|
|
185
|
+
.replace(/{{\s*css\s*}}/g, options.css ?? CSSType.None)
|
|
186
|
+
.replace(/{{\s*framework\s*}}/g, options.framework ?? FrameworkType.React)
|
|
187
|
+
.replace(/{{\s*version\s*}}/g, options.version ?? '')
|
|
188
|
+
.replace(/{{\s*date\s*}}/g, options.date ?? '')
|
|
189
|
+
.replace(/{{\s*cssExt\s*}}/g, options.cssExt ?? 'css')
|
|
190
|
+
.replace(/{{\s*pageName\s*}}/g, options.pageName ?? 'index');
|
|
191
|
+
}
|
|
192
|
+
function toPascalCase(value) {
|
|
193
|
+
return value
|
|
194
|
+
.split(/[^a-zA-Z0-9]+/)
|
|
195
|
+
.filter(Boolean)
|
|
196
|
+
.map((word) => `${word.charAt(0).toUpperCase()}${word.slice(1)}`)
|
|
197
|
+
.join('');
|
|
198
|
+
}
|
|
199
|
+
function normalizeTemplateDestination(destinationPath) {
|
|
200
|
+
const parsedPath = path.parse(destinationPath);
|
|
201
|
+
let normalizedPath = destinationPath;
|
|
202
|
+
if (parsedPath.ext === '.tmpl') {
|
|
203
|
+
normalizedPath = path.join(parsedPath.dir, parsedPath.name);
|
|
204
|
+
}
|
|
205
|
+
const basename = path.basename(normalizedPath);
|
|
206
|
+
if (basename.startsWith('_')) {
|
|
207
|
+
normalizedPath = path.join(path.dirname(normalizedPath), basename.slice(1));
|
|
208
|
+
}
|
|
209
|
+
return normalizedPath;
|
|
210
|
+
}
|
|
211
|
+
async function collectTemplateFiles(templatePath) {
|
|
212
|
+
const entries = await (0, promises_1.readdir)(templatePath, { withFileTypes: true });
|
|
213
|
+
const files = await Promise.all(entries.map(async (entry) => {
|
|
214
|
+
const entryPath = path.join(templatePath, entry.name);
|
|
215
|
+
if (entry.isDirectory())
|
|
216
|
+
return collectTemplateFiles(entryPath);
|
|
217
|
+
if (FILE_FILTER.has(entry.name))
|
|
218
|
+
return [];
|
|
219
|
+
return [entryPath];
|
|
220
|
+
}));
|
|
221
|
+
return files.flat();
|
|
222
|
+
}
|
|
223
|
+
async function initGit(projectName, projectPath) {
|
|
224
|
+
console.log(`cd ${projectName}, 执行 ${taro_helper_1.chalk.cyan.bold('git init')}`);
|
|
225
|
+
try {
|
|
226
|
+
await executeCommand('git', ['init'], projectPath);
|
|
227
|
+
console.log(`${taro_helper_1.chalk.green('✔')} ${taro_helper_1.chalk.green('初始化 git 成功')}`);
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
console.log(`${taro_helper_1.chalk.red('✘')} ${taro_helper_1.chalk.red('初始化 git 失败')}`);
|
|
231
|
+
if (error.code === 'ENOENT') {
|
|
232
|
+
console.log('没有找到命令 git, 请检查!');
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
console.log(error);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
async function installDeps(npm, projectPath, onSuccess) {
|
|
239
|
+
const command = PACKAGE_MANAGERS[npm];
|
|
240
|
+
if (!command)
|
|
241
|
+
return;
|
|
242
|
+
console.log(`执行安装项目依赖 ${taro_helper_1.chalk.cyan.bold(`${command} install`)}, 需要一会儿...`);
|
|
243
|
+
try {
|
|
244
|
+
await executeCommand(command, ['install'], projectPath);
|
|
245
|
+
console.log(`${taro_helper_1.chalk.green('✔')} ${taro_helper_1.chalk.green('安装项目依赖成功')}`);
|
|
246
|
+
onSuccess();
|
|
247
|
+
}
|
|
248
|
+
catch (error) {
|
|
249
|
+
console.log(`${taro_helper_1.chalk.red('✘')} ${taro_helper_1.chalk.red('安装项目依赖失败,请自行重新安装!')}`);
|
|
250
|
+
if (error.code === 'ENOENT') {
|
|
251
|
+
console.log(`没有找到命令 ${command}, 请检查!`);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function executeCommand(command, args, cwd) {
|
|
256
|
+
return new Promise((resolve, reject) => {
|
|
257
|
+
const childProcess = (0, node_child_process_1.spawn)(command, args, { cwd, stdio: 'inherit' });
|
|
258
|
+
childProcess.on('error', reject);
|
|
259
|
+
childProcess.on('close', (exitCode) => {
|
|
260
|
+
if (exitCode === 0) {
|
|
261
|
+
resolve();
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
reject(new Error(`${command} ${args.join(' ')} failed with exit code ${exitCode}`));
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
function printCreateSuccess(projectName) {
|
|
269
|
+
console.log(taro_helper_1.chalk.green(`创建项目 ${taro_helper_1.chalk.green.bold(projectName)} 成功!`));
|
|
270
|
+
console.log(taro_helper_1.chalk.green(`请进入项目目录 ${taro_helper_1.chalk.green.bold(projectName)} 开始工作吧!😝`));
|
|
271
|
+
}
|
|
272
|
+
function normalizePath(value) {
|
|
273
|
+
return value.replace(/\\/g, '/').replace(/\/{2,}/g, '/');
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=template-creator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-creator.js","sourceRoot":"","sources":["../../src/create/template-creator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,sCAmCC;AAtID,2DAA2C;AAC3C,+CAAiF;AACjF,gDAAkC;AAElC,oDAA2C;AAE3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EAAE,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;YACpC,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;gBACnB,OAAO,EAAE,CAAC;gBACV,OAAO;YACT,CAAC;YACD,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,0BAA0B,QAAQ,EAAE,CAAC,CAAC,CAAC;QACtF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,kBAAkB,CAAC,WAAmB;IAC7C,OAAO,CAAC,GAAG,CAAC,mBAAK,CAAC,KAAK,CAAC,QAAQ,mBAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,GAAG,CAAC,mBAAK,CAAC,KAAK,CAAC,WAAW,mBAAK,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC;AAChF,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AAC3D,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
Error
|
|
3
|
-
Warning
|
|
4
|
-
Success
|
|
5
|
-
Manual
|
|
6
|
-
}
|
|
1
|
+
export declare const MessageKind: {
|
|
2
|
+
readonly Error: "error";
|
|
3
|
+
readonly Warning: "warning";
|
|
4
|
+
readonly Success: "success";
|
|
5
|
+
readonly Manual: "manual";
|
|
6
|
+
};
|
|
7
|
+
export type MessageKind = (typeof MessageKind)[keyof typeof MessageKind];
|
|
7
8
|
export interface ValidateMessage {
|
|
8
9
|
kind: MessageKind;
|
|
9
10
|
content: string;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateEslint = exports.validateRecommend = exports.validatePackage = exports.validateEnv = exports.validateConfig = exports.MessageKind = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
})(MessageKind || (exports.MessageKind = MessageKind = {}));
|
|
4
|
+
exports.MessageKind = {
|
|
5
|
+
Error: 'error',
|
|
6
|
+
Warning: 'warning',
|
|
7
|
+
Success: 'success',
|
|
8
|
+
Manual: 'manual',
|
|
9
|
+
};
|
|
11
10
|
const validResult = () => ({
|
|
12
11
|
isValid: true,
|
|
13
12
|
messages: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/doctor/validators.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/doctor/validators.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAcX,MAAM,WAAW,GAAG,GAAmB,EAAE,CAAC,CAAC;IACzC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC;AAEI,MAAM,cAAc,GAAG,KAAK,EAAE,GAAG,KAAgB,EAA2B,EAAE,CAAC,WAAW,EAAE,CAAC;AAAvF,QAAA,cAAc,kBAAyE;AAC7F,MAAM,WAAW,GAAG,KAAK,EAAE,GAAG,KAAgB,EAA2B,EAAE,CAAC,WAAW,EAAE,CAAC;AAApF,QAAA,WAAW,eAAyE;AAC1F,MAAM,eAAe,GAAG,KAAK,EAAE,GAAG,KAAgB,EAA2B,EAAE,CAAC,WAAW,EAAE,CAAC;AAAxF,QAAA,eAAe,mBAAyE;AAC9F,MAAM,iBAAiB,GAAG,KAAK,EAAE,GAAG,KAAgB,EAA2B,EAAE,CAAC,WAAW,EAAE,CAAC;AAA1F,QAAA,iBAAiB,qBAAyE;AAChG,MAAM,cAAc,GAAG,KAAK,EAAE,GAAG,KAAgB,EAA2B,EAAE,CAAC,WAAW,EAAE,CAAC;AAAvF,QAAA,cAAc,kBAAyE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const needPromiseApis: Set<string>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.needPromiseApis = void 0;
|
|
4
|
+
exports.needPromiseApis = new Set([
|
|
5
|
+
'addFileToFavorites',
|
|
6
|
+
'addVideoToFavorites',
|
|
7
|
+
'authPrivateMessage',
|
|
8
|
+
'checkIsAddedToMyMiniProgram',
|
|
9
|
+
'chooseContact',
|
|
10
|
+
'cropImage',
|
|
11
|
+
'disableAlertBeforeUnload',
|
|
12
|
+
'editImage',
|
|
13
|
+
'enableAlertBeforeUnload',
|
|
14
|
+
'getBackgroundFetchData',
|
|
15
|
+
'getChannelsLiveInfo',
|
|
16
|
+
'getChannelsLiveNoticeInfo',
|
|
17
|
+
'getFuzzyLocation',
|
|
18
|
+
'getGroupEnterInfo',
|
|
19
|
+
'getLocalIPAddress',
|
|
20
|
+
'getShareInfo',
|
|
21
|
+
'getUserProfile',
|
|
22
|
+
'getWeRunData',
|
|
23
|
+
'join1v1Chat',
|
|
24
|
+
'openChannelsActivity',
|
|
25
|
+
'openChannelsEvent',
|
|
26
|
+
'openChannelsLive',
|
|
27
|
+
'openChannelsUserProfile',
|
|
28
|
+
'openCustomerServiceChat',
|
|
29
|
+
'openVideoEditor',
|
|
30
|
+
'saveFileToDisk',
|
|
31
|
+
'scanItem',
|
|
32
|
+
'setEnable1v1Chat',
|
|
33
|
+
'setWindowSize',
|
|
34
|
+
'sendBizRedPacket',
|
|
35
|
+
'startFacialRecognitionVerify',
|
|
36
|
+
]);
|
|
37
|
+
//# sourceMappingURL=apis-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apis-list.js","sourceRoot":"","sources":["../../src/platform-weapp/apis-list.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,IAAI,GAAG,CAAC;IACrC,oBAAoB;IACpB,qBAAqB;IACrB,oBAAoB;IACpB,6BAA6B;IAC7B,eAAe;IACf,WAAW;IACX,0BAA0B;IAC1B,WAAW;IACX,yBAAyB;IACzB,wBAAwB;IACxB,qBAAqB;IACrB,2BAA2B;IAC3B,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,aAAa;IACb,sBAAsB;IACtB,mBAAmB;IACnB,kBAAkB;IAClB,yBAAyB;IACzB,yBAAyB;IACzB,iBAAiB;IACjB,gBAAgB;IAChB,UAAU;IACV,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,8BAA8B;CAC/B,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface TaroApiTarget {
|
|
2
|
+
cloud?: unknown;
|
|
3
|
+
getTabBar?: (pageCtx?: {
|
|
4
|
+
getTabBar?: () => {
|
|
5
|
+
$taroInstances?: unknown;
|
|
6
|
+
};
|
|
7
|
+
}) => unknown;
|
|
8
|
+
getRenderer?: () => string;
|
|
9
|
+
getCurrentInstance?: () => {
|
|
10
|
+
page?: {
|
|
11
|
+
renderer?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function initNativeApi(taro: TaroApiTarget): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initNativeApi = initNativeApi;
|
|
4
|
+
const taro_shared_1 = require("@spcsn/taro-shared");
|
|
5
|
+
const apis_list_1 = require("./apis-list");
|
|
6
|
+
function initNativeApi(taro) {
|
|
7
|
+
(0, taro_shared_1.processApis)(taro, wx, {
|
|
8
|
+
needPromiseApis: apis_list_1.needPromiseApis,
|
|
9
|
+
modifyApis(apis) {
|
|
10
|
+
// fix https://github.com/NervJS/taro/issues/9899
|
|
11
|
+
apis.delete('lanDebug');
|
|
12
|
+
},
|
|
13
|
+
transformMeta(api, options) {
|
|
14
|
+
if (api === 'showShareMenu') {
|
|
15
|
+
const showShareItems = Array.isArray(options.showShareItems) ? options.showShareItems : [];
|
|
16
|
+
options.menus = showShareItems.map((item) => item === 'wechatFriends' ? 'shareAppMessage' : item === 'wechatMoment' ? 'shareTimeline' : item);
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
key: api,
|
|
20
|
+
options,
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
taro.cloud = wx.cloud;
|
|
25
|
+
taro.getTabBar = function (pageCtx) {
|
|
26
|
+
if (typeof pageCtx?.getTabBar === 'function') {
|
|
27
|
+
return pageCtx.getTabBar()?.$taroInstances;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
taro.getRenderer = function () {
|
|
31
|
+
return taro.getCurrentInstance?.()?.page?.renderer ?? 'webview';
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=apis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apis.js","sourceRoot":"","sources":["../../src/platform-weapp/apis.ts"],"names":[],"mappings":";;AAiBA,sCA8BC;AA/CD,oDAAiD;AAEjD,2CAA8C;AAe9C,SAAgB,aAAa,CAAC,IAAmB;IAC/C,IAAA,yBAAW,EAAC,IAAI,EAAE,EAAE,EAAE;QACpB,eAAe,EAAf,2BAAe;QACf,UAAU,CAAC,IAAI;YACb,iDAAiD;YACjD,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC1B,CAAC;QACD,aAAa,CAAC,GAAW,EAAE,OAAgC;YACzD,IAAI,GAAG,KAAK,eAAe,EAAE,CAAC;gBAC5B,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC3F,OAAO,CAAC,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAC1C,IAAI,KAAK,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAChG,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,GAAG,EAAE,GAAG;gBACR,OAAO;aACR,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;IACH,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,CAAC;IACtB,IAAI,CAAC,SAAS,GAAG,UAAU,OAAO;QAChC,IAAI,OAAO,OAAO,EAAE,SAAS,KAAK,UAAU,EAAE,CAAC;YAC7C,OAAO,OAAO,CAAC,SAAS,EAAE,EAAE,cAAc,CAAC;QAC7C,CAAC;IACH,CAAC,CAAC;IACF,IAAI,CAAC,WAAW,GAAG;QACjB,OAAO,IAAI,CAAC,kBAAkB,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,IAAI,SAAS,CAAC;IAClE,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare const View = "view";
|
|
2
|
+
export declare const Block = "block";
|
|
3
|
+
export declare const CustomWrapper = "custom-wrapper";
|
|
4
|
+
export declare const Slot = "slot";
|
|
5
|
+
export declare const NativeSlot = "native-slot";
|
|
6
|
+
export declare const Icon = "icon";
|
|
7
|
+
export declare const Progress = "progress";
|
|
8
|
+
export declare const RichText = "rich-text";
|
|
9
|
+
export declare const Text = "text";
|
|
10
|
+
export declare const Button = "button";
|
|
11
|
+
export declare const Checkbox = "checkbox";
|
|
12
|
+
export declare const CheckboxGroup = "checkbox-group";
|
|
13
|
+
export declare const Form = "form";
|
|
14
|
+
export declare const Input = "input";
|
|
15
|
+
export declare const Label = "label";
|
|
16
|
+
export declare const Picker = "picker";
|
|
17
|
+
export declare const PickerView = "picker-view";
|
|
18
|
+
export declare const PickerViewColumn = "picker-view-column";
|
|
19
|
+
export declare const Radio = "radio";
|
|
20
|
+
export declare const RadioGroup = "radio-group";
|
|
21
|
+
export declare const Slider = "slider";
|
|
22
|
+
export declare const Switch = "switch";
|
|
23
|
+
export declare const Textarea = "textarea";
|
|
24
|
+
export declare const CoverImage = "cover-image";
|
|
25
|
+
export declare const CoverView = "cover-view";
|
|
26
|
+
export declare const MovableArea = "movable-area";
|
|
27
|
+
export declare const MovableView = "movable-view";
|
|
28
|
+
export declare const ScrollView = "scroll-view";
|
|
29
|
+
export declare const Swiper = "swiper";
|
|
30
|
+
export declare const SwiperItem = "swiper-item";
|
|
31
|
+
export declare const Navigator = "navigator";
|
|
32
|
+
export declare const Editor = "editor";
|
|
33
|
+
export declare const MatchMedia = "match-media";
|
|
34
|
+
export declare const FunctionalPageNavigator = "functional-page-navigator";
|
|
35
|
+
export declare const Audio = "audio";
|
|
36
|
+
export declare const Camera = "camera";
|
|
37
|
+
export declare const Image = "image";
|
|
38
|
+
export declare const LivePlayer = "live-player";
|
|
39
|
+
export declare const LivePusher = "live-pusher";
|
|
40
|
+
export declare const Video = "video";
|
|
41
|
+
export declare const Canvas = "canvas";
|
|
42
|
+
export declare const Ad = "ad";
|
|
43
|
+
export declare const OfficialAccount = "official-account";
|
|
44
|
+
export declare const OpenData = "open-data";
|
|
45
|
+
export declare const WebView = "web-view";
|
|
46
|
+
export declare const Map = "map";
|
|
47
|
+
export declare const NavigationBar = "navigation-bar";
|
|
48
|
+
export declare const PageMeta = "page-meta";
|
|
49
|
+
export declare const VoipRoom = "voip-room";
|
|
50
|
+
export declare const AdCustom = "ad-custom";
|
|
51
|
+
export declare const PageContainer = "page-container";
|
|
52
|
+
export declare const ShareElement = "share-element";
|
|
53
|
+
export declare const KeyboardAccessory = "keyboard-accessory";
|
|
54
|
+
export declare const RootPortal = "root-portal";
|
|
55
|
+
export declare const ChannelLive = "channel-live";
|
|
56
|
+
export declare const ChannelVideo = "channel-video";
|
|
57
|
+
export declare const ListView = "list-view";
|
|
58
|
+
export declare const ListBuilder = "list-builder";
|
|
59
|
+
export declare const List = "list";
|
|
60
|
+
export declare const ListItem = "list-item";
|
|
61
|
+
export declare const GridView = "grid-view";
|
|
62
|
+
export declare const GridBuilder = "grid-builder";
|
|
63
|
+
export declare const StickyHeader = "sticky-header";
|
|
64
|
+
export declare const StickySection = "sticky-section";
|
|
65
|
+
export declare const NestedScrollHeader = "nested-scroll-header";
|
|
66
|
+
export declare const NestedScrollBody = "nested-scroll-body";
|
|
67
|
+
export declare const PullToRefresh = "pull-to-refresh";
|
|
68
|
+
export declare const Script = "script";
|
|
69
|
+
export declare const Snapshot = "snapshot";
|
|
70
|
+
export declare const Span = "span";
|
|
71
|
+
export declare const OpenContainer = "open-container";
|
|
72
|
+
export declare const DraggableSheet = "draggable-sheet";
|
|
73
|
+
export declare const DoubleTapGestureHandler = "double-tap-gesture-handler";
|
|
74
|
+
export declare const ForcePressGestureHandler = "force-press-gesture-handler";
|
|
75
|
+
export declare const HorizontalDragGestureHandler = "horizontal-drag-gesture-handler";
|
|
76
|
+
export declare const LongPressGestureHandler = "long-press-gesture-handler";
|
|
77
|
+
export declare const PanGestureHandler = "pan-gesture-handler";
|
|
78
|
+
export declare const ScaleGestureHandler = "scale-gesture-handler";
|
|
79
|
+
export declare const TapGestureHandler = "tap-gesture-handler";
|
|
80
|
+
export declare const VerticalDragGestureHandler = "vertical-drag-gesture-handler";
|