UNPKG

@manuth/generator-wsc-package

Version:

A Generator for WoltLab Suite Core Packages.

47 lines (46 loc) 2 kB
/// <reference types="yeoman-generator" /> import { GeneratorOptions, IFileMapping, Question } from "@manuth/extended-yo-generator"; import { IPathQuestion } from "@manuth/generator-ts-project"; import { ILocalComponentOptions } from "../Settings/ILocalComponentOptions.js"; import { IWoltLabSettings } from "../Settings/IWoltLabSettings.js"; import { InstructionComponent } from "./InstructionComponent.js"; /** * Provides a component for generating instruction-files which are loaded from local. * * @template TSettings * The type of the settings of the generator. * * @template TOptions * The type of the options of the generator. * * @template TComponentOptions * The type of the options of the component. */ export declare abstract class LocalInstructionComponent<TSettings extends IWoltLabSettings, TOptions extends GeneratorOptions, TComponentOptions extends ILocalComponentOptions> extends InstructionComponent<TSettings, TOptions, TComponentOptions> { /** * Gets the default name of the path to suggest in the {@link LocalInstructionComponent.SourceQuestion `SourceQuestion`}. */ protected abstract get DefaultSourceBaseName(): string; /** * Gets a question for asking for the source of the templates. */ protected get SourceQuestion(): IPathQuestion<TComponentOptions>; /** * @inheritdoc */ protected get ComponentOptionQuestionCollection(): Array<Question<TComponentOptions>>; /** * @inheritdoc */ protected get InstructionFileMapping(): IFileMapping<TSettings, TOptions>; /** * Gets the default full name of the path to suggest in the {@link LocalInstructionComponent.SourceQuestion `SourceQuestion`}. * * @param options * The options of the component. * * @returns * The default full name of the path to suggest in the {@link LocalInstructionComponent.SourceQuestion `SourceQuestion`}. */ protected GetDefaultSource(options: TComponentOptions): string; }