feat(cli): useTs 为必填参数

This commit is contained in:
kevinyzheng 2022-11-16 17:43:20 +08:00 committed by roymondchen
parent b512e14129
commit bb5aa6722f
2 changed files with 3 additions and 3 deletions

View File

@ -56,12 +56,12 @@ export interface UserConfig {
/** 组件文件后缀名例如vue文件为.vuetsx文件为.tsx普通js文件则为.js */
componentFileAffix: string;
cleanTemp: boolean;
/** 入口文件是否生成为 ts 格式 */
useTs: boolean;
/** npm 配置用于当packages配置有npm包名时可以自动安装npm包 */
npmConfig?: NpmConfig;
/** 是否使用import()加载组件 */
dynamicImport?: boolean;
/** 入口文件是否生成为 ts 格式 */
useTs?: boolean;
hooks?: {
beforeWriteEntry?: (genContentMap: Record<string, string>, app: Core) => Promise<Record<string, string>>;
};

View File

@ -28,7 +28,7 @@ export const prepareEntryFile = async (app: App) => {
};
const generateContent = (
useTs = true,
useTs: boolean,
type: EntryType,
map: Record<string, string>,
componentFileAffix = '',