UNPKG

rush-init-project-plugin

Version:

Rush plugin for initialize project in monorepo

35 lines 1.38 kB
import { AsyncSeriesHook, HookMap, SyncHook } from 'tapable'; import type { ActionType, NodePlopAPI, PromptQuestion } from 'node-plop'; import type { IDefaultProjectConfiguration } from './logic/TemplateConfiguration'; import type { IExtendedAnswers } from './plopfile'; import type { ITemplatePathNameType } from './logic/templateFolder'; export interface ITemplatesHook { templates: ITemplatePathNameType[]; } export interface IPromptsHookParams { /** * The queue of prompt question. and question will be prompt to use in sequence order */ promptQueue: PromptQuestion[]; } export interface IActionsHookParams { /** * A list of plop action. These actions will be registered into plop */ actions: ActionType[]; } type IAnswers = IExtendedAnswers; export type IResult = 'Succeeded' | 'Failed'; export interface IHooks { templates: AsyncSeriesHook<ITemplatesHook>; prompts: AsyncSeriesHook<IPromptsHookParams>; actions: SyncHook<IActionsHookParams>; answers: AsyncSeriesHook<IAnswers>; plop: SyncHook<NodePlopAPI>; promptQuestion: HookMap<SyncHook<[PromptQuestion, IAnswers], null | undefined>>; defaultProjectConfiguration: SyncHook<[IDefaultProjectConfiguration, IAnswers]>; done: AsyncSeriesHook<[IResult, IAnswers]>; } export declare const getHooks: () => IHooks; export {}; //# sourceMappingURL=hooks.d.ts.map