@lytjs/cli 6.4.0 → 6.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/create.cjs +95 -10
- package/dist/create.cjs.map +1 -1
- package/dist/create.mjs +95 -10
- package/dist/create.mjs.map +1 -1
- package/dist/index.cjs +868 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.mjs +849 -20
- package/dist/index.mjs.map +1 -1
- package/dist/lyt.cjs +868 -19
- package/dist/lyt.cjs.map +1 -1
- package/dist/lyt.d.mts +1 -1
- package/dist/lyt.d.ts +1 -1
- package/dist/lyt.mjs +849 -20
- package/dist/lyt.mjs.map +1 -1
- package/lyt-cli.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ interface TestOptions {
|
|
|
34
34
|
}
|
|
35
35
|
interface AddOptions {
|
|
36
36
|
force?: boolean;
|
|
37
|
+
typescript?: boolean;
|
|
38
|
+
scoped?: boolean;
|
|
37
39
|
}
|
|
38
40
|
interface PackageJson {
|
|
39
41
|
name: string;
|
|
@@ -97,12 +99,30 @@ declare function test(options?: TestOptions): Promise<void>;
|
|
|
97
99
|
* Generate components, pages, and stores.
|
|
98
100
|
*/
|
|
99
101
|
|
|
100
|
-
type AddType = 'component' | 'page' | 'store';
|
|
102
|
+
type AddType = 'component' | 'page' | 'store' | 'directive' | 'composable' | 'util' | 'middleware' | 'hook';
|
|
101
103
|
/**
|
|
102
104
|
* Add a component, page, or store
|
|
103
105
|
*/
|
|
104
106
|
declare function add(type: AddType, name: string, options?: AddOptions): Promise<void>;
|
|
105
107
|
|
|
108
|
+
/**
|
|
109
|
+
* @lytjs/cli - 代码生成器命令
|
|
110
|
+
*
|
|
111
|
+
* 提供组件、页面、服务等代码生成功能
|
|
112
|
+
*/
|
|
113
|
+
interface GenerateOptions {
|
|
114
|
+
type: 'component' | 'page' | 'service' | 'hook' | 'store' | 'layout' | 'middleware';
|
|
115
|
+
name: string;
|
|
116
|
+
path?: string;
|
|
117
|
+
withStyles?: boolean;
|
|
118
|
+
withTest?: boolean;
|
|
119
|
+
withStorybook?: boolean;
|
|
120
|
+
description?: string;
|
|
121
|
+
template?: 'default' | 'sfc' | 'functional';
|
|
122
|
+
language?: 'ts' | 'js';
|
|
123
|
+
}
|
|
124
|
+
declare function generate(options: GenerateOptions): Promise<void>;
|
|
125
|
+
|
|
106
126
|
/**
|
|
107
127
|
* @lytjs/cli - plugin command
|
|
108
128
|
*
|
|
@@ -185,4 +205,4 @@ declare function getRunCommand(pm: PackageManager, script: string): string;
|
|
|
185
205
|
*/
|
|
186
206
|
declare function getAddCommand(pm: PackageManager, dep: string, dev?: boolean): string;
|
|
187
207
|
|
|
188
|
-
export { type BuildOptions, type CliOptions, type CreateOptions, type DevOptions, type PackageJson, type PluginBuildOptions, type PluginCreateOptions, type PluginPublishOptions, type PluginValidateOptions, type TestOptions, add, build, buildPlugin, create, createPlugin, detectPackageManager, dev, ensureDir, exists, getAddCommand, getInstallCommand, getRunCommand, listPluginTemplates, listTemplates, logger, readFile, runCli, test, validatePlugin, writeFile };
|
|
208
|
+
export { type BuildOptions, type CliOptions, type CreateOptions, type DevOptions, type GenerateOptions, type PackageJson, type PluginBuildOptions, type PluginCreateOptions, type PluginPublishOptions, type PluginValidateOptions, type TestOptions, add, build, buildPlugin, create, createPlugin, detectPackageManager, dev, ensureDir, exists, generate, getAddCommand, getInstallCommand, getRunCommand, listPluginTemplates, listTemplates, logger, readFile, runCli, test, validatePlugin, writeFile };
|