UNPKG

@winjs-dev/create-win

Version:

@winjs-dev/create-win

54 lines (53 loc) 1.26 kB
import { yParser } from '@winner-fed/utils'; import { type WinTemplate } from './template'; interface ITemplateArgs { template?: WinTemplate; } interface IArgs extends yParser.Arguments, ITemplateArgs { default?: boolean; git?: boolean; install?: boolean; } interface ITemplatePluginParams { pluginName?: string; } interface ITemplateParams extends ITemplatePluginParams { version: string; projectName: string; appContainerName: string; npmClient: ENpmClient | string; registry: string; author: string; email: string; withHusky: boolean; extraNpmrc: string; vueVersion?: EVueVersion; isVue2?: boolean; isVue3?: boolean; } declare enum ENpmClient { npm = "npm", yarn = "yarn", pnpm = "pnpm" } declare enum ETemplate { app = "app", pc = "pc", plugin = "plugin", sample = "sample" } declare enum EVueVersion { vue2 = "2", vue3 = "3" } export interface IDefaultData extends ITemplateParams { appTemplate?: ETemplate; vueVersion?: EVueVersion; } interface IGeneratorOpts { cwd: string; args: IArgs; defaultData?: IDefaultData; } declare const _default: ({ cwd, args, defaultData, }: IGeneratorOpts) => Promise<void>; export default _default;