mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-03 06:29:18 +08:00
feat(cli): useTs 为必填参数
This commit is contained in:
parent
b512e14129
commit
bb5aa6722f
@ -56,12 +56,12 @@ export interface UserConfig {
|
|||||||
/** 组件文件后缀名,例如vue文件为.vue,tsx文件为.tsx,普通js文件则为.js */
|
/** 组件文件后缀名,例如vue文件为.vue,tsx文件为.tsx,普通js文件则为.js */
|
||||||
componentFileAffix: string;
|
componentFileAffix: string;
|
||||||
cleanTemp: boolean;
|
cleanTemp: boolean;
|
||||||
|
/** 入口文件是否生成为 ts 格式 */
|
||||||
|
useTs: boolean;
|
||||||
/** npm 配置,用于当packages配置有npm包名时,可以自动安装npm包 */
|
/** npm 配置,用于当packages配置有npm包名时,可以自动安装npm包 */
|
||||||
npmConfig?: NpmConfig;
|
npmConfig?: NpmConfig;
|
||||||
/** 是否使用import()加载组件 */
|
/** 是否使用import()加载组件 */
|
||||||
dynamicImport?: boolean;
|
dynamicImport?: boolean;
|
||||||
/** 入口文件是否生成为 ts 格式 */
|
|
||||||
useTs?: boolean;
|
|
||||||
hooks?: {
|
hooks?: {
|
||||||
beforeWriteEntry?: (genContentMap: Record<string, string>, app: Core) => Promise<Record<string, string>>;
|
beforeWriteEntry?: (genContentMap: Record<string, string>, app: Core) => Promise<Record<string, string>>;
|
||||||
};
|
};
|
||||||
|
@ -28,7 +28,7 @@ export const prepareEntryFile = async (app: App) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const generateContent = (
|
const generateContent = (
|
||||||
useTs = true,
|
useTs: boolean,
|
||||||
type: EntryType,
|
type: EntryType,
|
||||||
map: Record<string, string>,
|
map: Record<string, string>,
|
||||||
componentFileAffix = '',
|
componentFileAffix = '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user